PackageManager.RequestAddPackageByAppInstallerFileAsync 方法

定義

允許使用 .appinstaller 檔案來安裝單一或多個應用程式 套件 。 這會先執行 SmartScreen 篩選和使用者驗證,再安裝應用程式套件 () 。

public:
 virtual IAsyncOperationWithProgress<DeploymentResult ^, DeploymentProgress> ^ RequestAddPackageByAppInstallerFileAsync(Uri ^ appInstallerFileUri, AddPackageByAppInstallerOptions options, PackageVolume ^ targetVolume) = RequestAddPackageByAppInstallerFileAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> RequestAddPackageByAppInstallerFileAsync(Uri const& appInstallerFileUri, AddPackageByAppInstallerOptions const& options, PackageVolume const& targetVolume);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperationWithProgress<DeploymentResult,DeploymentProgress> RequestAddPackageByAppInstallerFileAsync(System.Uri appInstallerFileUri, AddPackageByAppInstallerOptions options, PackageVolume targetVolume);
function requestAddPackageByAppInstallerFileAsync(appInstallerFileUri, options, targetVolume)
Public Function RequestAddPackageByAppInstallerFileAsync (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

範例

套件

備註

這個方法與 AddPackageByAppInstallerAsync 相同,但這個方法會使用 SmartScreen 篩選器。

JavaScript 不支援這個方法。 不過,您可以建立Windows 執行階段元件來呼叫此方法,然後從 JavaScript UWP 應用程式呼叫此元件。 如需詳細資訊,請參閱 應用程式安裝程式檔案 API 問題

適用於

另請參閱