PackageManager.FindPackagesForUserWithPackageTypes Method

Definition

Overloads

FindPackagesForUserWithPackageTypes(String, PackageTypes)

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

FindPackagesForUserWithPackageTypes(String, String, PackageTypes)

Retrieves information about a specified family of Packages and of specific types that are installed for the specified user.

FindPackagesForUserWithPackageTypes(String, String, String, PackageTypes)

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

FindPackagesForUserWithPackageTypes(String, PackageTypes)

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

C#
[Windows.Foundation.Metadata.Overload("FindPackagesByUserSecurityIdWithPackageTypes")]
public IEnumerable<Package> FindPackagesForUserWithPackageTypes(string userSecurityId, PackageTypes packageTypes);

Parameters

userSecurityId
String

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
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.

Returns

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.

Attributes

Windows requirements

App capabilities
packageQuery

Remarks

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

See also

Applies to

WinRT Build 26100 and other versions
Product Versions
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100

FindPackagesForUserWithPackageTypes(String, String, PackageTypes)

Retrieves information about a specified family of Packages and of specific types that are installed for the specified user.

C#
[Windows.Foundation.Metadata.Overload("FindPackagesByUserSecurityIdPackageFamilyNameWithPackageTypes")]
public IEnumerable<Package> FindPackagesForUserWithPackageTypes(string userSecurityId, string packageFamilyName, PackageTypes packageTypes);

Parameters

userSecurityId
String

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

packageFamilyName
String

The family name of packages to find. This parameter can't be null.

packageTypes
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.

Returns

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. The packageTypes parameter determines the types of packages to return.

Attributes

Windows requirements

App capabilities
packageQuery

See also

Applies to

WinRT Build 26100 and other versions
Product Versions
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100

FindPackagesForUserWithPackageTypes(String, String, String, PackageTypes)

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

C#
[Windows.Foundation.Metadata.Overload("FindPackagesByUserSecurityIdNamePublisherWithPackageTypes")]
public IEnumerable<Package> FindPackagesForUserWithPackageTypes(string userSecurityId, string packageName, string packagePublisher, PackageTypes packageTypes);

Parameters

userSecurityId
String

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
String

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

packagePublisher
String

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

packageTypes
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.

Returns

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.

Attributes

Windows requirements

App capabilities
packageQuery

See also

Applies to

WinRT Build 26100 and other versions
Product Versions
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100