共用方式為


AppInstallManager.GetIsAppAllowedToInstallForUserAsync 方法

定義

判斷指定的應用程式是否具有在目前電腦或裝置上為指定使用者安裝的許可權,以及產生遙測資料的選項。

public:
 virtual IAsyncOperation<bool> ^ GetIsAppAllowedToInstallForUserAsync(User ^ user, Platform::String ^ productId, Platform::String ^ skuId, Platform::String ^ catalogId, Platform::String ^ correlationVector) = GetIsAppAllowedToInstallForUserAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<bool> GetIsAppAllowedToInstallForUserAsync(User const& user, winrt::hstring const& productId, winrt::hstring const& skuId, winrt::hstring const& catalogId, winrt::hstring const& correlationVector);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<bool> GetIsAppAllowedToInstallForUserAsync(User user, string productId, string skuId, string catalogId, string correlationVector);
function getIsAppAllowedToInstallForUserAsync(user, productId, skuId, catalogId, correlationVector)
Public Function GetIsAppAllowedToInstallForUserAsync (user As User, productId As String, skuId As String, catalogId As String, correlationVector As String) As IAsyncOperation(Of Boolean)

參數

user
User

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

productId
String

Platform::String

winrt::hstring

這個方法將檢查的應用程式產品識別碼,以判斷其是否具有安裝的許可權。

skuId
String

Platform::String

winrt::hstring

此方法將檢查的應用程式 SKU 識別碼,以判斷其是否具有安裝的許可權。

catalogId
String

Platform::String

winrt::hstring

這個方法將檢查的應用程式目錄識別碼,以判斷其是否具有安裝的許可權。

correlationVector
String

Platform::String

winrt::hstring

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

傳回

在成功完成時,如果應用程式有安裝許可權,則非同步作業會傳回 true;否則為 false。

屬性

Windows 需求

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

適用於