PackageManager.CleanupPackageForUserAsync(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
virtual IAsyncOperationWithProgress<DeploymentResult ^, DeploymentProgress> ^ CleanupPackageForUserAsync(Platform::String ^ packageName, Platform::String ^ userSecurityId) = CleanupPackageForUserAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> CleanupPackageForUserAsync(winrt::hstring const& packageName, winrt::hstring const& userSecurityId);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperationWithProgress<DeploymentResult,DeploymentProgress> CleanupPackageForUserAsync(string packageName, string userSecurityId);
function cleanupPackageForUserAsync(packageName, userSecurityId)
Public Function CleanupPackageForUserAsync (packageName As String, userSecurityId As String) As IAsyncOperationWithProgress(Of DeploymentResult, DeploymentProgress)
Parameters
- packageName
-
String
Platform::String
winrt::hstring
The package name.
- userSecurityId
-
String
Platform::String
winrt::hstring
The user security identifier (SID).
Returns
The status of the deployment request. The DeploymentResult contains the final returned value of the deployment operation, once it is completed. The DeploymentProgress can be used to obtain the percentage of completion over the entire course of the deployment operation.
- Attributes
Windows requirements
App capabilities |
packageManagement
|
Remarks
The app binaries are not cleaned up unless the app is installed for has no other users. This method does not clear the registration of the app from the user's profile. Before you call this method, be sure that the user's profile is deleted. If the user profile is not deleted and the user logs back to the profile, the profile may show traces of the app. There may also be broken file type associations and broken tile links for the app. The caller must have administrative privilege or the call fails. In addition, the policy to allow deployment operations in special profiles must be enabled. By default, this policy is disabled.