AppInstallManager.StartAppInstallAsync 方法

定义

重载

StartAppInstallAsync(String, String, Boolean, Boolean)

启动指定应用的安装。

StartAppInstallAsync(String, String, Boolean, Boolean, String, String, String)

使用 生成遥测数据的选项启动指定应用的安装。

StartAppInstallAsync(String, String, Boolean, Boolean)

启动指定应用的安装。

public:
 virtual IAsyncOperation<AppInstallItem ^> ^ StartAppInstallAsync(Platform::String ^ productId, Platform::String ^ skuId, bool repair, bool forceUseOfNonRemovableStorage) = StartAppInstallAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<AppInstallItem> StartAppInstallAsync(winrt::hstring const& productId, winrt::hstring const& skuId, bool const& repair, bool const& forceUseOfNonRemovableStorage);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<AppInstallItem> StartAppInstallAsync(string productId, string skuId, bool repair, bool forceUseOfNonRemovableStorage);
function startAppInstallAsync(productId, skuId, repair, forceUseOfNonRemovableStorage)
Public Function StartAppInstallAsync (productId As String, skuId As String, repair As Boolean, forceUseOfNonRemovableStorage As Boolean) As IAsyncOperation(Of AppInstallItem)

参数

productId
String

Platform::String

winrt::hstring

要安装的应用的产品 ID。

skuId
String

Platform::String

winrt::hstring

要安装的应用的 SKU ID。

repair
Boolean

bool

如果为 True,则尝试修复已安装的应用的安装;否则为 false。

forceUseOfNonRemovableStorage
Boolean

bool

如果为 True,则将应用安装到不可移动存储,即使用户已将应用配置为安装到 SD 卡;如果为 false,则根据用户的设置将应用安装到不可移动存储或 SD 卡。

返回

一个异步操作,该操作在成功完成后返回一个 AppInstallItem,该 AppInstallItem 表示已添加到安装队列的应用。

属性

Windows 要求

应用功能
runFullTrust

注解

当此方法成功返回时,应用已添加到安装队列中;这并不一定意味着应用已完成安装。 若要确定安装状态,检查 AppInstallItem 返回值的 GetCurrentStatus 方法。

另请参阅

适用于

StartAppInstallAsync(String, String, Boolean, Boolean, String, String, String)

使用 生成遥测数据的选项启动指定应用的安装。

public:
 virtual IAsyncOperation<AppInstallItem ^> ^ StartAppInstallAsync(Platform::String ^ productId, Platform::String ^ skuId, bool repair, bool forceUseOfNonRemovableStorage, Platform::String ^ catalogId, Platform::String ^ bundleId, Platform::String ^ correlationVector) = StartAppInstallAsync;
/// [Windows.Foundation.Metadata.Overload("StartAppInstallWithTelemetryAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<AppInstallItem> StartAppInstallAsync(winrt::hstring const& productId, winrt::hstring const& skuId, bool const& repair, bool const& forceUseOfNonRemovableStorage, winrt::hstring const& catalogId, winrt::hstring const& bundleId, winrt::hstring const& correlationVector);
[Windows.Foundation.Metadata.Overload("StartAppInstallWithTelemetryAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<AppInstallItem> StartAppInstallAsync(string productId, string skuId, bool repair, bool forceUseOfNonRemovableStorage, string catalogId, string bundleId, string correlationVector);
function startAppInstallAsync(productId, skuId, repair, forceUseOfNonRemovableStorage, catalogId, bundleId, correlationVector)
Public Function StartAppInstallAsync (productId As String, skuId As String, repair As Boolean, forceUseOfNonRemovableStorage As Boolean, catalogId As String, bundleId As String, correlationVector As String) As IAsyncOperation(Of AppInstallItem)

参数

productId
String

Platform::String

winrt::hstring

要安装的应用的产品 ID。

skuId
String

Platform::String

winrt::hstring

要安装的应用的 SKU ID。

repair
Boolean

bool

如果为 True,则尝试修复已安装的应用的安装;否则为 false。

forceUseOfNonRemovableStorage
Boolean

bool

如果为 True,则将应用安装到不可移动存储,即使用户已将应用配置为安装到 SD 卡;如果为 false,则根据用户的设置将应用安装到不可移动存储或 SD 卡。

catalogId
String

Platform::String

winrt::hstring

要安装的应用的目录 ID。

bundleId
String

Platform::String

winrt::hstring

要安装的应用的捆绑 ID。

correlationVector
String

Platform::String

winrt::hstring

可用于生成遥测数据的关联向量字符串。

返回

一个异步操作,该操作在成功完成后返回一个 AppInstallItem,该 AppInstallItem 表示已添加到安装队列的应用。

属性

Windows 要求

设备系列
Windows 10 (在 10.0.10586.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v2.0 中引入)
应用功能
runFullTrust

注解

StartAppInstallAsync (String、String、Boolean、Boolean) 注释也适用于此方法。

另请参阅

适用于