0 out of 2 rated this helpful - Rate this topic

PackageManager class

Manages the software available to a user.

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

Syntax


public sealed class PackageManager : Object

Attributes

ActivatableAttribute(NTDDI_WIN8)
MarshalingBehaviorAttribute(Agile)
ThreadingAttribute(Both)
VersionAttribute(NTDDI_WIN8)

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.
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.
RemovePackageAsync
SetPackageState Sets the state of a package, for example, to usable, tampered with, and so on.
StagePackageAsync
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]

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

 

 

Build date: 2/25/2013

© 2013 Microsoft. All rights reserved.