StoreContext.UninstallStorePackageByStoreIdAsync(String) Method

Definition

Uninstalls the specified downloadable content (DLC) package for the current app without displaying a notification UI dialog to the user.

public:
 virtual IAsyncOperation<StoreUninstallStorePackageResult ^> ^ UninstallStorePackageByStoreIdAsync(Platform::String ^ storeId) = UninstallStorePackageByStoreIdAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StoreUninstallStorePackageResult> UninstallStorePackageByStoreIdAsync(winrt::hstring const & storeId);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StoreUninstallStorePackageResult> UninstallStorePackageByStoreIdAsync(string storeId);
function uninstallStorePackageByStoreIdAsync(storeId)
Public Function UninstallStorePackageByStoreIdAsync (storeId As String) As IAsyncOperation(Of StoreUninstallStorePackageResult)

Parameters

storeId
String

The Store ID of the add-on that corresponds to the DLC package to uninstall for the current app.

Returns

IAsyncOperation<StoreUninstallStorePackageResult>

An asynchronous operation that, on successful completion, returns a StoreUninstallStorePackageResult object that provides info about the uninstall operation.

Attributes

Windows 10 requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.Services.Store.StoreContract (introduced in v4.0)
App capabilities
storePackageManagement

Remarks

You can use this method to free up disk space by uninstalling DLC packages that are no longer needed. For example, a game that offers both a single player campaign and a multiplayer campaign might use this method to uninstall the single player campaign at the user's request, after the user has completed that campaign.

Note

DLC packages are not available to all developer accounts.

When you call this method, the OS silently uninstalls the package without displaying a notification dialog. This method requires the restricted storePackageManagement capability to perform this operation. If you don't have access to this restricted capability, you can use the RequestUninstallStorePackageAsync or RequestUninstallStorePackageByStoreIdAsync methods instead (these methods display a notification dialog that requests the user's permission to uninstall the package).

Note

The restricted storePackageManagement capability is only available to desktop applications and games that use the Desktop Bridge and to Xbox games that use XVC packages and are developed as part of a managed partner program, such as the ID@Xbox program. These applications and games have this capability by default.

The Store ID for an add-on is available in Partner Center, and it also is returned by the StoreId property of the StoreProduct that represents the add-on. For more information, see Store IDs.

Applies to

See also