PackageManager class

Applies to Windows only

Manages the software available to a user.

Important  You can't use this class in a Windows Store app.

Syntax


Public NotInheritable Class PackageManager

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]

Members

The PackageManager class has these types of members:

Constructors

The PackageManager class has these constructors.

ConstructorDescription
PackageManager Creates and initializes a new instance of the object.

 

Methods

The PackageManager class has these methods. It also inherits methods from the Object class.

MethodDescription
AddPackageAsync Adds a package (main package) and its dependencies for the current logged-in user.
CleanupPackageForUserAsync Cleans up a specified package for a specified user. Used to cleanup packages installed for a user after their user profile is deleted.
FindPackage Retrieves information about the specified package installed for any user.
FindPackageForUser Retrieves information about a specific package installed for a specific user or for all users.
FindPackages() Retrieves information about a specified family of packages installed across all users.
FindPackages(String) Retrieves information about a specified family of packages installed across all users.
FindPackages(String, String) Finds all installed packages with the specified name and publisher.
FindPackagesForUser(String) Finds all packages installed for the specified user.
FindPackagesForUser(String, String) Retrieves information about a specified family of packages installed for a specific user.
FindPackagesForUser(String, String, String) Retrieves information about all packages 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.
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.
FindPackagesWithPackageTypes(PackageTypes) Retrieves information about specific package types that are installed across all users.
FindPackagesWithPackageTypes(String, PackageTypes) Retrieves information about a specified family of packages and specific package types that are installed across all users.
FindPackagesWithPackageTypes(String, String, PackageTypes) Finds all installed packages of specific types with the specified name and publisher.
FindUsers Finds the users who have installed the specified package.
RegisterPackageAsync Registers a package (the main package) and its dependency packages for the current user.
RegisterPackageByFullNameAsync Registers a package (the main package) by its full name and its dependency packages for the current user.
RemovePackageAsync(String) Removes a package for the current user asynchronously and receives progress and status messages on the removal operation.
RemovePackageAsync(String, RemovalOptions) Removes a package for the current user asynchronously and receives progress and status messages on the removal operation.
SetPackageState Sets the state of a package, for example, to usable, tampered with, and so on.
StagePackageAsync(Uri, IIterable(Uri)) Stages a package to the system without registering it.
StagePackageAsync(Uri, IIterable(Uri), DeploymentOptions) Stages a package to the system without registering it.
StageUserDataAsync Stages a package's user data to the system without registering it.
UpdatePackageAsync Updates an installed package or its dependency packages for the current user.

 

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Minimum supported phone

None supported

Namespace

Windows.Management.Deployment
Windows::Management::Deployment [C++]

Metadata

Windows.winmd

See also

Samples
Add app package sample
Enumerate app packages sample
Enumerate app packages by name and publisher sample
Enumerate app packages by user SID sample
Remove app package sample
Concepts
App packages and deployment
Reference
DeploymentResult
PackageUserInformation

 

 

Show:
© 2014 Microsoft