PackageManager.FindPackagesForUserWithPackageTypes Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. |
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 const& 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
Platform::String
winrt::hstring
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
- FindPackagesForUserWithPackageTypes(String, String, String, PackageTypes)
- FindPackagesForUserWithPackageTypes(String, String, PackageTypes)
- Package
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 |
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 const& 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
Platform::String
winrt::hstring
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
Platform::String
winrt::hstring
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
- FindPackagesForUserWithPackageTypes(String, PackageTypes)
- FindPackagesForUserWithPackageTypes(String, String, String, PackageTypes)
- Package
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 |
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 const& 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
Platform::String
winrt::hstring
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
Platform::String
winrt::hstring
The package name. This parameter can't be null.
- packagePublisher
-
String
Platform::String
winrt::hstring
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
- FindPackagesForUserWithPackageTypes(String, PackageTypes)
- FindPackagesForUserWithPackageTypes(String, String, PackageTypes)
- Package
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 |