共用方式為


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 問題

適用於

另請參閱