StoreContext.TrySilentDownloadAndInstallStorePackageUpdatesAsync Method

Definition

Attempts to download and install the specified package updates for the current app from the Microsoft Store without displaying a notification UI to the user.

public:
 virtual IAsyncOperationWithProgress<StorePackageUpdateResult ^, StorePackageUpdateStatus> ^ TrySilentDownloadAndInstallStorePackageUpdatesAsync(IIterable<StorePackageUpdate ^> ^ storePackageUpdates) = TrySilentDownloadAndInstallStorePackageUpdatesAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperationWithProgress<StorePackageUpdateResult, StorePackageUpdateStatus> TrySilentDownloadAndInstallStorePackageUpdatesAsync(IIterable<StorePackageUpdate> const& storePackageUpdates);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperationWithProgress<StorePackageUpdateResult,StorePackageUpdateStatus> TrySilentDownloadAndInstallStorePackageUpdatesAsync(IEnumerable<StorePackageUpdate> storePackageUpdates);
function trySilentDownloadAndInstallStorePackageUpdatesAsync(storePackageUpdates)
Public Function TrySilentDownloadAndInstallStorePackageUpdatesAsync (storePackageUpdates As IEnumerable(Of StorePackageUpdate)) As IAsyncOperationWithProgress(Of StorePackageUpdateResult, StorePackageUpdateStatus)

Parameters

storePackageUpdates

IIterable<StorePackageUpdate>

IEnumerable<StorePackageUpdate>

The set of StorePackageUpdate objects that represent the updated packages to download and install.

Returns

An object that the caller can observe to track progress and completion for the operation. On successful completion, the result is a StorePackageUpdateResult object that provides info about the package updates.

Attributes

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.Services.Store.StoreContract (introduced in v3.0)

Remarks

Use this method to attempt to download package updates for the current app silently (without displaying a notification UI that asks the user's permission to proceed with the download). Before calling this method, first check the CanSilentlyDownloadStorePackageUpdates property to determine whether package updates can be silently downloaded based on the user's settings and network configuration. This method is an alternative to RequestDownloadStorePackageUpdatesAsync, which displays a notification UI.

To get the list of packages that have updates available, use the GetAppAndOptionalStorePackageUpdatesAsync method. If you have already download package updates silently by using TrySilentDownloadStorePackageUpdatesAsync, this method will install the updates without trying to download them again.

This operation will not block. The IAsyncOperationWithProgress object returned by this method will complete after the update packages are downloaded and installed.

Applies to

See also