PackageManager.AddPackageByAppInstallerFileAsync 方法

定义

允许使用 .appinstaller 文件安装单个或多个应用

public:
 virtual IAsyncOperationWithProgress<DeploymentResult ^, DeploymentProgress> ^ AddPackageByAppInstallerFileAsync(Uri ^ appInstallerFileUri, AddPackageByAppInstallerOptions options, PackageVolume ^ targetVolume) = AddPackageByAppInstallerFileAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> AddPackageByAppInstallerFileAsync(Uri const& appInstallerFileUri, AddPackageByAppInstallerOptions const& options, PackageVolume const& targetVolume);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperationWithProgress<DeploymentResult,DeploymentProgress> AddPackageByAppInstallerFileAsync(System.Uri appInstallerFileUri, AddPackageByAppInstallerOptions options, PackageVolume targetVolume);
function addPackageByAppInstallerFileAsync(appInstallerFileUri, options, targetVolume)
Public Function AddPackageByAppInstallerFileAsync (appInstallerFileUri As Uri, options As AddPackageByAppInstallerOptions, targetVolume As PackageVolume) As IAsyncOperationWithProgress(Of DeploymentResult, DeploymentProgress)

参数

appInstallerFileUri
Uri Uri

.appinstaller 文件的 URI。

targetVolume
PackageVolume

包安装到的卷。

返回

属性

Windows 要求

设备系列
Windows 10 Fall Creators Update (在 10.0.16299.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v5.0 中引入)
应用功能
packageManagement

注解

JavaScript 不支持此方法。 但是,你可以创建调用此方法的 Windows 运行时 组件,然后从 JavaScript UWP 应用调用此组件。 有关详细信息,请参阅 应用安装程序文件 API 问题

适用于

另请参阅