This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
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.
Manages the software available to a user.
public ref class PackageManager sealed/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]class PackageManager final/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]class PackageManager final[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))][Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)][Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)][Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]public sealed class PackageManager[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)][Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)][Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)][Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]public sealed class PackageManagerPublic NotInheritable Class PackageManager| Requirements | Description |
|---|---|
| Device family | Windows 10 (introduced in 10.0.10240.0) |
| API contract | Windows.Foundation.UniversalApiContract (introduced in v1.0) |
| Windows version | SDK version | Value added |
|---|---|---|
| 1607 | 14393 | GetPackageVolumesAsync |
| 1703 | 15063 | AddPackageAsync(Uri,IEnumerable<Uri>,DeploymentOptions,PackageVolume,IEnumerable<String>,IEnumerable<Uri>) |
| 1703 | 15063 | DebugSettings |
| 1703 | 15063 | RegisterPackageByFamilyNameAsync |
| 1703 | 15063 | StagePackageAsync(Uri,IEnumerable<Uri>,DeploymentOptions,PackageVolume,IEnumerable<String>,IEnumerable<Uri>) |
| 1709 | 16299 | AddPackageAsync(Uri,IEnumerable<Uri>,DeploymentOptions,PackageVolume,IEnumerable<String>,IEnumerable<Uri>,IEnumerable<Uri>) |
| 1709 | 16299 | AddPackageByAppInstallerFileAsync |
| 1709 | 16299 | ProvisionPackageForAllUsersAsync |
| 1709 | 16299 | RequestAddPackageAsync(Uri,IEnumerable<Uri>,DeploymentOptions,PackageVolume,IEnumerable<String>,IEnumerable<Uri>) |
| 1709 | 16299 | RequestAddPackageByAppInstallerFileAsync |
| 1709 | 16299 | StagePackageAsync(Uri,IEnumerable<Uri>,DeploymentOptions,PackageVolume,IEnumerable<String>,IEnumerable<Uri>,IEnumerable<<Uri>) |
| 1803 | 17134 | RequestAddPackageAsync(Uri,IEnumerable<Uri>,DeploymentOptions,PackageVolume,IEnumerable<String>,IEnumerable<Uri>,IEnumerable<Uri>) |
| 1809 | 17763 | DeprovisionPackageForAllUsersAsync |
| 2004 | 19041 | AddPackageByUriAsync |
| 2004 | 19041 | FindProvisionedPackages |
| 2004 | 19041 | GetPackageStubPreference |
| 2004 | 19041 | RegisterPackageByUriAsync |
| 2004 | 19041 | RegisterPackagesByFullNameAsync |
| 2004 | 19041 | SetPackageStubPreference |
| 2004 | 19041 | StagePackageByUriAsync |
| Name | Description |
|---|---|
| PackageManager() | Creates and initializes a new instance of the object. |
| Name | Description |
|---|---|
| DebugSettings | Get the debugging settings forPackage deployment. |
| Name | Description |
|---|---|
| AddPackageAsync(Uri, IIterable<Uri>, DeploymentOptions, PackageVolume, IIterable<String>, IIterable<Uri>, IIterable<Uri>) | Adds aPackage (the main package) and its dependency packages for the current user, using the specified deployment options. |
| AddPackageAsync(Uri, IIterable<Uri>, DeploymentOptions, PackageVolume, IIterable<String>, IIterable<Uri>) | Adds aPackage and its dependency packages to the specified volume for the current user, using the specified deployment options. |
| AddPackageAsync(Uri, IIterable<Uri>, DeploymentOptions, PackageVolume) | Adds aPackage (the main package) and its dependency packages to the specified volume for the current user, using the specified deployment options. |
| AddPackageAsync(Uri, IIterable<Uri>, DeploymentOptions) | Adds aPackage (the main package) and its dependency packages for the current user, using the specified deployment options. |
| AddPackageByAppInstallerFileAsync(Uri, AddPackageByAppInstallerOptions, PackageVolume) | Allows single or multiple appPackages to be installed with an .appinstaller file. |
| AddPackageByUriAsync(Uri, AddPackageOptions) | Adds aPackage (the main package) and any additional dependency packages, for the current user, using the specified deployment options. |
| AddPackageVolumeAsync(String) | Creates a new volume. The caller must be a member of the administrators group. |
| CleanupPackageForUserAsync(String, String) | Cleans up a specifiedPackage for a specified user. Used to cleanup packages installed for a user after their user profile is deleted. |
| ClearPackageStatus(String, PackageStatus) | Clears the status of aPackage. |
| DeprovisionPackageForAllUsersAsync(String) | Deprovisions an appPackage so new users on the device will no longer have the app automatically installed. |
| FindPackage(String) | Retrieves information about the specifiedPackage installed for any user. |
| FindPackageForUser(String, String) | Retrieves information about a specificPackage installed for a specific user or for all users. |
| FindPackages() | Retrieves information about a specified family ofPackages installed across all users. |
| FindPackages(String, String) | Finds all installedPackages with the specified name and publisher. |
| FindPackages(String) | Retrieves information about a specified family ofPackages installed across all users. |
| FindPackagesForUser(String, String, String) | Retrieves information about allPackages with the specified package name and publisher name, installed for a specific user. |
| FindPackagesForUser(String, String) | Retrieves information about a specified family ofPackages installed for a specific user. |
| FindPackagesForUser(String) | Finds allPackages installed for the specified 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 ofPackages and of specific types that are installed for the specified user. |
| FindPackagesForUserWithPackageTypes(String, String, String, PackageTypes) | Retrieves information aboutPackages of specific types with the specified package name and publisher name, installed for a specific user. |
| FindPackagesWithPackageTypes(PackageTypes) | Retrieves information about specificPackage types that are installed across all users. |
| FindPackagesWithPackageTypes(String, PackageTypes) | Retrieves information about a specified family ofPackages and specific package types that are installed across all users. |
| FindPackagesWithPackageTypes(String, String, PackageTypes) | Finds all installedPackages of specific types with the specified name and publisher. |
| FindPackageVolume(String) | Gets the specified volume. |
| FindPackageVolumes() | Gets all the known volumes, regardless of their current state. |
| FindProvisionedPackages() | Gets the list of all installedPackages on the device. |
| FindUsers(String) | Finds the users who have installed the specifiedPackage. |
| GetDefaultPackageVolume() | Gets the defaultPackage volume, which is the target of deployment operations such as theAddPackageAsync method. |
| GetPackageStubPreference(String) | Gets a value that indicates whether the specified appPackage currently prefers to run as a full app or a stub app. |
| GetPackageVolumesAsync() | Gets thePackage volumes on the device. |
| IsPackageRemovalPending(String) | |
| IsPackageRemovalPendingByUri(Uri) | |
| IsPackageRemovalPendingByUriForUser(Uri, String) | |
| IsPackageRemovalPendingForUser(String, String) | |
| MovePackageToVolumeAsync(String, DeploymentOptions, PackageVolume) | Moves the specifiedPackage to the specified volume using the specified deployment options. |
| ProvisionPackageForAllUsersAsync(String, PackageAllUserProvisioningOptions) | Enables an appPackage to be installed for all users on a device, including options for specifying additional optional packages to be installed. |
| ProvisionPackageForAllUsersAsync(String) | Enables an appPackage to be installed for all users on a device. |
| RegisterPackageAsync(Uri, IIterable<Uri>, DeploymentOptions, PackageVolume) | Registers aPackage (the main package) and its dependency packages on the specified volume for the current user, using the specified deployment options. |
| RegisterPackageAsync(Uri, IIterable<Uri>, DeploymentOptions) | Registers aPackage (the main package) and its dependency packages for the current user, using the specified deployment options. |
| RegisterPackageByFamilyNameAsync(String, IIterable<String>, DeploymentOptions, PackageVolume, IIterable<String>) | Registers aPackage (the main package) by its family name and its dependency packages for the current user. |
| RegisterPackageByFullNameAsync(String, IIterable<String>, DeploymentOptions) | Registers aPackage (the main package) by its full name and its dependency packages for the current user. |
| RegisterPackageByUriAsync(Uri, RegisterPackageOptions) | Registers aPackage (the main package) and its dependency packages for the current user, using the specified deployment options. |
| RegisterPackagesByFullNameAsync(IIterable<String>, RegisterPackageOptions) | Registers the specifiedPackages by their full name for the current user. |
| RemovePackageAsync(String, RemovalOptions) | Removes aPackage for the current user asynchronously and receives progress and status messages on the removal operation. Dependency packages are also removed for the user if no other packages installed for the user depend on them. |
| RemovePackageAsync(String) | Removes aPackage for the current user asynchronously and receives progress and status messages on the removal operation. Dependency packages are also removed for the user if no other packages installed for the user depend on them. |
| RemovePackageByUriAsync(Uri, RemovePackageOptions) | |
| RemovePackageVolumeAsync(PackageVolume) | Removes the specified volume. |
| RequestAddPackageAsync(Uri, IIterable<Uri>, DeploymentOptions, PackageVolume, IIterable<String>, IIterable<Uri>, IIterable<Uri>) | Requests a SmartScreen check and user verification before installing the appPackage(s). This method provides apackageUrisToInstall overload to specify external packages to be staged and registered. |
| RequestAddPackageAsync(Uri, IIterable<Uri>, DeploymentOptions, PackageVolume, IIterable<String>, IIterable<Uri>) | Requests a SmartScreen check and user verification before installing the appPackage(s). |
| RequestAddPackageByAppInstallerFileAsync(Uri, AddPackageByAppInstallerOptions, PackageVolume) | Allows single or multiple appPackages to be installed with an .appinstaller file. This will perform a SmartScreen filter and user verification before installing the app package(s). |
| SetDefaultPackageVolume(PackageVolume) | Sets the defaultPackage volume, which is the target of deployment operations such as theAddPackageAsync method. |
| SetPackageState(String, PackageState) | Sets the state of aPackage, for example, to usable, tampered with, and so on. |
| SetPackageStatus(String, PackageStatus) | Sets the status of the specifiedPackage. |
| SetPackageStubPreference(String, PackageStubPreference) | Sets a value that indicates whether the specified appPackage currently prefers to run as a full app or a stub app. |
| SetPackageVolumeOfflineAsync(PackageVolume) | Sets the specified volume to an offline state. The caller must be a member of the administrators group. |
| SetPackageVolumeOnlineAsync(PackageVolume) | Sets the specified volume to an online state. The caller must be a member of the administrators group. |
| StagePackageAsync(Uri, IIterable<Uri>, DeploymentOptions, PackageVolume, IIterable<String>, IIterable<Uri>, IIterable<Uri>) | Stages aPackage to the system without registering it. |
| StagePackageAsync(Uri, IIterable<Uri>, DeploymentOptions, PackageVolume, IIterable<String>, IIterable<Uri>) | Stages aPackage to the system without registering it. |
| StagePackageAsync(Uri, IIterable<Uri>, DeploymentOptions, PackageVolume) | Stages aPackage to the system without registering it. |
| StagePackageAsync(Uri, IIterable<Uri>, DeploymentOptions) | Stages aPackage to the system without registering it. |
| StagePackageAsync(Uri, IIterable<Uri>) | Stages aPackage to the system without registering it. |
| StagePackageByUriAsync(Uri, StagePackageOptions) | Stages aPackage to the system without registering it, using the specified deployment options. |
| StageUserDataAsync(String, DeploymentOptions) | Stages aPackage's roaming data to the system without registering the package. Call this method after staging the package but before registering the package for a particular user. |
| StageUserDataAsync(String) | Stages aPackage's roaming data to the system without registering the package. Call this method after staging the package but before registering the package for a particular user. |
| UpdatePackageAsync(Uri, IIterable<Uri>, DeploymentOptions) | Updates an installedPackage or its dependency packages for the current user. |
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Was this page helpful?
Want to try using Ask Learn to clarify or guide you through this topic?