PackageManager.FindPackagesForUserWithPackageTypes(String, PackageTypes) | findPackagesForUserWithPackageTypes(String, PackageTypes) method

Applies to Windows only

Finds packages of specific types that are installed for the specified user.

Syntax


var iIterable = packageManager.findPackagesForUserWithPackageTypes(userSecurityId, packageTypes);

Parameters

userSecurityId

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

The user security identifier (SID). If this parameter is null, the packages are retrieved for the current user. Any user SID other than that of current user requires administrative privileges.

packageTypes

Type: PackageTypes

A combination of PackageTypes-typed values that are combined by using a bitwise OR operation. The resulting value specifies the types of packages to be included in the result set.

Return value

Type: IIterable<Package> [JavaScript/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. The packageTypes parameter determines the types of packages to return.

Remarks

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

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

None supported

Namespace

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

Metadata

Windows.winmd

See also

PackageManager
FindPackagesForUserWithPackageTypes(String, String, String, PackageTypes)
FindPackagesForUserWithPackageTypes(String, String, PackageTypes)

 

 

Show:
© 2014 Microsoft