Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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

Applies to Windows only

Retrieves information about packages of specific types with the specified package name and publisher name, installed for a specific user.

Syntax


var iIterable = packageManager.findPackagesForUserWithPackageTypes(userSecurityId, packageName, packagePublisher, 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.

packageName

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

The package name. This parameter can't be null.

packagePublisher

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

The package publisher. This parameter can't be null.

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. If no packages with the specified package publisher and family name are found, this method returns an empty list. 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, PackageTypes)
FindPackagesForUserWithPackageTypes(String, String, PackageTypes)

 

 

Show:
© 2014 Microsoft