PackageManager.FindPackagesWithPackageTypes(String, String, PackageTypes) | findPackagesWithPackageTypes(String, String, PackageTypes) method

Applies to Windows only

Finds all installed packages of specific types with the specified name and publisher.

Syntax


public IEnumerable<Package> FindPackagesWithPackageTypes(
  string packageName, 
  string packagePublisher, 
  PackageTypes packageTypes
)

Parameters

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 with the same package name and publisher name 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 name and publisher are found, this method returns an empty list. The packageTypes parameter determines the types of packages to return.

Remarks

This method requires administrative privileges. Each package in the IIterable(Package) collection may be installed for the current user or for another user. This method differs from the FindPackagesWithPackageTypes(String packageFamilyName, PackageTypes) method because the parameters specified must be the package name and the package publisher name, not the package family name which includes the publisher hash value.

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
FindPackagesWithPackageTypes(PackageTypes)
FindPackagesWithPackageTypes(String, PackageTypes)

 

 

Show:
© 2014 Microsoft