EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

PackageManager.UpdatePackageAsync method

Applies to Windows only

Updates an installed package or its dependency packages for the current user.

Syntax


public IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> UpdatePackageAsync(
  Uri packageUri, 
  IEnumerable<Uri> dependencyPackageUris, 
  DeploymentOptions deploymentOptions
)

Parameters

packageUri

Type: System.Uri [.NET] | Windows::Foundation::Uri [C++]

The source URI of the main package.

dependencyPackageUris

Type: IIterable<Uri> [C++] | System.Collections.Generic.IEnumerable<Uri> [.NET]

The source URIs of the dependency packages.

deploymentOptions

Type: DeploymentOptions

One of the permitted enumeration values. ForceApplicationShutdown and None are the only valid options for this method and specifying any other deployment option results in an E_INVALIDARG return value.

Return value

Type: IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress>

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

An installed package can be updated only if the version of the update package is higher than that of the installed package. If no previous version of the package exists, the operation fails.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

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

Metadata

Windows.winmd

See also

PackageManager

 

 

Mostrar:
© 2014 Microsoft