Skip to content

Latest commit

 

History

History
36 lines (20 loc) · 2.5 KB

packagemanager_addpackagebyuriasync_797417417.md

File metadata and controls

36 lines (20 loc) · 2.5 KB
-api-id -api-type
M:Windows.Management.Deployment.PackageManager.AddPackageByUriAsync(Windows.Foundation.Uri,Windows.Management.Deployment.AddPackageOptions)
winrt method

-description

Adds a Package (the main package) and any additional dependency packages, for the current user, using the specified deployment options.

-parameters

-param packageUri

The URI of the package to add. The URI can use the file URI scheme (file://) for local file paths and local network paths. HTTP and HTTPS protocols are also supported. Starting with Windows build 22556, The URI can point to a package or an App Installer file.

-param options

The package deployment options for the operation.

-returns

The status of the deployment request. The DeploymentResult contains the final returned value of the deployment operation, once it is completed. The DeploymentProgress can be used to obtain the percentage of completion over the entire course of the deployment operation.

-remarks

This method simplifies the existing AddPackageAsync overloads by consolidating all of the deployment options into a single parameter. This method also supports the following features not available with the the AddPackageAsync overloads:

  • You can use the ExternalLocationURI property of the options parameter to specify the URI of an external disk location outside of the MSIX package where the package manifest can reference application content. For more information about this scenario and a related code sample, see Grant package identity by packaging with external location.

  • You can use the AllowUnsigned property of the options parameter to allow activation information from an executable in an unsigned package. For more information about this scenario and a related code sample, see Hosted apps.

-see-also

Package, AddPackageOptions,Grant package identity by packaging with external location, Hosted apps

-examples