PackageManager.RegisterPackageByUriAsync(Uri, RegisterPackageOptions) Method

Definition

Registers a Package (the main package) and its dependency packages for the current user, using the specified deployment options.

public:
 virtual IAsyncOperationWithProgress<DeploymentResult ^, DeploymentProgress> ^ RegisterPackageByUriAsync(Uri ^ manifestUri, RegisterPackageOptions ^ options) = RegisterPackageByUriAsync;
/// [Windows.Foundation.Metadata.Overload("RegisterPackageByUriAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> RegisterPackageByUriAsync(Uri const& manifestUri, RegisterPackageOptions const& options);
[Windows.Foundation.Metadata.Overload("RegisterPackageByUriAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperationWithProgress<DeploymentResult,DeploymentProgress> RegisterPackageByUriAsync(System.Uri manifestUri, RegisterPackageOptions options);
function registerPackageByUriAsync(manifestUri, options)
Public Function RegisterPackageByUriAsync (manifestUri As Uri, options As RegisterPackageOptions) As IAsyncOperationWithProgress(Of DeploymentResult, DeploymentProgress)

Parameters

manifestUri
Uri Uri

The URI of the manifest for the main package.

options
RegisterPackageOptions

The package registration 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.

Attributes

Windows requirements

Device family
Windows 10, version 2004 (introduced in 10.0.19041.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v10.0)

Remarks

This method simplifies the existing RegisterPackageAsync overloads by consolidating all of the deployment options into a single parameter. This method also supports the following features not available with the the RegisterPackageAsync 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.

Applies to

See also