Windows Dev Center

EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

PackageManager.FindPackagesForUser(String, String) method

Retrieves information about a specified family of packages installed for a specific user.

Syntax


public IEnumerable<Package> FindPackagesForUser(
  string userSecurityId, 
  string packageFamilyName
)

Parameters

userSecurityId

Type: System.String [.NET] | Platform::String [C++]

The user security identifier (SID). If this parameter is null, the packages are retrieved for the current user.

packageFamilyName

Type: System.String [.NET] | Platform::String [C++]

The family name of packages to find. This parameter cannot be null.

Return value

Type: IIterable<Package> [C++] | System.Collections.Generic.IEnumerable<Package> [.NET]

If the method succeeds, an enumerable collection of package objects is returned. Each Package object in this collection contains information about the package, including but not limited to its name, publisher, version, and install location. If no packages with the specified package family name are found, this method returns an empty list.

Remarks

This method requires administrative privileges if the user security ID specified is different from the user security ID of the calling user. Otherwise, an AccessDeniedException will be thrown.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Management.Deployment
Windows::Management::Deployment [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

Windows.Management.Deployment
Windows::Management::Deployment [C++]

Metadata

Windows.winmd

See also

PackageManager
FindPackagesForUser(String)
FindPackagesForUser(String, String, String)

 

 

Mostrar:
© 2015 Microsoft