共用方式為


AppInstallManager.StartProductInstallForUserAsync 方法

定義

多載

StartProductInstallForUserAsync(User, String, String, String, String, AppInstallOptions)

開始為指定的使用者安裝指定的應用程式或應用程式套件組合,並指定其他安裝選項,例如是否允許強制應用程式重新開機。

StartProductInstallForUserAsync(User, String, String, String, String, Boolean, Boolean, String, PackageVolume)

開始為指定的使用者安裝指定的應用程式或應用程式套件組合。

StartProductInstallForUserAsync(User, String, String, String, String, AppInstallOptions)

開始為指定的使用者安裝指定的應用程式或應用程式套件組合,並指定其他安裝選項,例如是否允許強制應用程式重新開機。

public:
 virtual IAsyncOperation<IVectorView<AppInstallItem ^> ^> ^ StartProductInstallForUserAsync(User ^ user, Platform::String ^ productId, Platform::String ^ flightId, Platform::String ^ clientId, Platform::String ^ correlationVector, AppInstallOptions ^ installOptions) = StartProductInstallForUserAsync;
/// [Windows.Foundation.Metadata.Overload("StartProductInstallWithOptionsForUserAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<AppInstallItem>> StartProductInstallForUserAsync(User const& user, winrt::hstring const& productId, winrt::hstring const& flightId, winrt::hstring const& clientId, winrt::hstring const& correlationVector, AppInstallOptions const& installOptions);
[Windows.Foundation.Metadata.Overload("StartProductInstallWithOptionsForUserAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<AppInstallItem>> StartProductInstallForUserAsync(User user, string productId, string flightId, string clientId, string correlationVector, AppInstallOptions installOptions);
function startProductInstallForUserAsync(user, productId, flightId, clientId, correlationVector, installOptions)
Public Function StartProductInstallForUserAsync (user As User, productId As String, flightId As String, clientId As String, correlationVector As String, installOptions As AppInstallOptions) As IAsyncOperation(Of IReadOnlyList(Of AppInstallItem))

參數

user
User

物件,識別要為此作業指定的使用者。

productId
String

Platform::String

winrt::hstring

要安裝之應用程式的產品識別碼。

flightId
String

Platform::String

winrt::hstring

要安裝之應用程式的正式發行前小眾測試版識別碼。

clientId
String

Platform::String

winrt::hstring

呼叫端的識別碼。

correlationVector
String

Platform::String

winrt::hstring

可用來產生遙測資料的相互關聯向量字串。

installOptions
AppInstallOptions

提供作業的其他選項,包括允許強制應用程式重新開機的能力。

傳回

在成功完成時,非同步作業會針對已新增至安裝佇列的應用程式套件組合) 傳回應用程式套件組合的應用程式或一組應用程式 (。 如果您使用 非同步程式設計,結果類型是 AppInstallItem 專案的唯讀清單/向量。 (您可以使用適用于 C++ 或 JavaScript 的IVectorView < AppInstallItem> API、適用于 .NET.) 的IReadOnlyList < AppInstallItem > API

屬性

Windows 需求

裝置系列
Windows 10, version 1803 (已於 10.0.17134.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v6.0 引進)
應用程式功能
runFullTrust

適用於

StartProductInstallForUserAsync(User, String, String, String, String, Boolean, Boolean, String, PackageVolume)

開始為指定的使用者安裝指定的應用程式或應用程式套件組合。

public:
 virtual IAsyncOperation<IVectorView<AppInstallItem ^> ^> ^ StartProductInstallForUserAsync(User ^ user, Platform::String ^ productId, Platform::String ^ catalogId, Platform::String ^ flightId, Platform::String ^ clientId, bool repair, bool forceUseOfNonRemovableStorage, Platform::String ^ correlationVector, PackageVolume ^ targetVolume) = StartProductInstallForUserAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<AppInstallItem>> StartProductInstallForUserAsync(User const& user, winrt::hstring const& productId, winrt::hstring const& catalogId, winrt::hstring const& flightId, winrt::hstring const& clientId, bool const& repair, bool const& forceUseOfNonRemovableStorage, winrt::hstring const& correlationVector, PackageVolume const& targetVolume);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<AppInstallItem>> StartProductInstallForUserAsync(User user, string productId, string catalogId, string flightId, string clientId, bool repair, bool forceUseOfNonRemovableStorage, string correlationVector, PackageVolume targetVolume);
function startProductInstallForUserAsync(user, productId, catalogId, flightId, clientId, repair, forceUseOfNonRemovableStorage, correlationVector, targetVolume)
Public Function StartProductInstallForUserAsync (user As User, productId As String, catalogId As String, flightId As String, clientId As String, repair As Boolean, forceUseOfNonRemovableStorage As Boolean, correlationVector As String, targetVolume As PackageVolume) As IAsyncOperation(Of IReadOnlyList(Of AppInstallItem))

參數

user
User

物件,識別要為此作業指定的使用者。

productId
String

Platform::String

winrt::hstring

要安裝之應用程式的產品識別碼。

catalogId
String

Platform::String

winrt::hstring

要安裝之應用程式的目錄識別碼。

flightId
String

Platform::String

winrt::hstring

要安裝之應用程式的正式發行前小眾測試版識別碼。

clientId
String

Platform::String

winrt::hstring

呼叫端的識別碼。

repair
Boolean

bool

True 是表示 嘗試修復已安裝的應用程式安裝;否則為 false。

forceUseOfNonRemovableStorage
Boolean

bool

True 是表示 即使使用者已將應用程式設定為安裝至 SD 記憶卡,仍會將應用程式安裝到非抽取式存放裝置;false 表示根據使用者的設定,將應用程式安裝到非抽取式存放裝置或 SD 記憶卡。

correlationVector
String

Platform::String

winrt::hstring

可用來產生遙測資料的相互關聯向量字串。

targetVolume
PackageVolume

將會安裝應用程式或應用程式套件組合的套件儲存磁片區。

傳回

在成功完成時,非同步作業會針對已新增至安裝佇列的應用程式套件組合) 傳回應用程式套件組合的應用程式或一組應用程式 (。 如果您使用 非同步程式設計,結果類型是 AppInstallItem 專案的唯讀清單/向量。 (您可以使用適用于 C++ 或 JavaScript 的IVectorView < AppInstallItem> API、適用于 .NET.) 的IReadOnlyList < AppInstallItem > API

屬性

Windows 需求

裝置系列
Windows 10 Anniversary Edition (已於 10.0.14393.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v3.0 引進)
應用程式功能
runFullTrust

適用於