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.

public:
 virtual IIterable<Package ^> ^ FindPackagesForUserWithPackageTypes(Platform::String ^ userSecurityId, PackageTypes packageTypes) = FindPackagesForUserWithPackageTypes;
/// [Windows.Foundation.Metadata.Overload("FindPackagesByUserSecurityIdWithPackageTypes")]
IIterable<Package> FindPackagesForUserWithPackageTypes(winrt::hstring const & userSecurityId, PackageTypes packageTypes);
[Windows.Foundation.Metadata.Overload("FindPackagesByUserSecurityIdWithPackageTypes")]
public IEnumerable<Package> FindPackagesForUserWithPackageTypes(string userSecurityId, PackageTypes packageTypes);
function findPackagesForUserWithPackageTypes(userSecurityId, packageTypes)
Public Function FindPackagesForUserWithPackageTypes (userSecurityId As String, packageTypes As PackageTypes) As IEnumerable(Of Package)

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

IEnumerable<Package>

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

FindPackagesForUserWithPackageTypes(String, String, PackageTypes)

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

public:
 virtual IIterable<Package ^> ^ FindPackagesForUserWithPackageTypes(Platform::String ^ userSecurityId, Platform::String ^ packageFamilyName, PackageTypes packageTypes) = FindPackagesForUserWithPackageTypes;
/// [Windows.Foundation.Metadata.Overload("FindPackagesByUserSecurityIdPackageFamilyNameWithPackageTypes")]
IIterable<Package> FindPackagesForUserWithPackageTypes(winrt::hstring const & userSecurityId, winrt::hstring const & packageFamilyName, PackageTypes packageTypes);
[Windows.Foundation.Metadata.Overload("FindPackagesByUserSecurityIdPackageFamilyNameWithPackageTypes")]
public IEnumerable<Package> FindPackagesForUserWithPackageTypes(string userSecurityId, string packageFamilyName, PackageTypes packageTypes);
function findPackagesForUserWithPackageTypes(userSecurityId, packageFamilyName, packageTypes)
Public Function FindPackagesForUserWithPackageTypes (userSecurityId As String, packageFamilyName As String, packageTypes As PackageTypes) As IEnumerable(Of Package)

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

IEnumerable<Package>

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 10 requirements

App capabilities
packageQuery

See also

Applies to

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.

public:
 virtual IIterable<Package ^> ^ FindPackagesForUserWithPackageTypes(Platform::String ^ userSecurityId, Platform::String ^ packageName, Platform::String ^ packagePublisher, PackageTypes packageTypes) = FindPackagesForUserWithPackageTypes;
/// [Windows.Foundation.Metadata.Overload("FindPackagesByUserSecurityIdNamePublisherWithPackageTypes")]
IIterable<Package> FindPackagesForUserWithPackageTypes(winrt::hstring const & userSecurityId, winrt::hstring const & packageName, winrt::hstring const & packagePublisher, PackageTypes packageTypes);
[Windows.Foundation.Metadata.Overload("FindPackagesByUserSecurityIdNamePublisherWithPackageTypes")]
public IEnumerable<Package> FindPackagesForUserWithPackageTypes(string userSecurityId, string packageName, string packagePublisher, PackageTypes packageTypes);
function findPackagesForUserWithPackageTypes(userSecurityId, packageName, packagePublisher, packageTypes)
Public Function FindPackagesForUserWithPackageTypes (userSecurityId As String, packageName As String, packagePublisher As String, packageTypes As PackageTypes) As IEnumerable(Of Package)

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

IEnumerable<Package>

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 10 requirements

App capabilities
packageQuery

See also

Applies to