MCPcopy Create free account
hub / github.com/MediaArea/MediaInfo / UnregisterSparsePackage

Function UnregisterSparsePackage

Source/WindowsPackageHelper/Installer.cpp:87–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85
86
87static HRESULT UnregisterSparsePackage()
88{
89 // Cannot handle sparse packages in safe-mode
90 if (GetSystemMetrics(SM_CLEANBOOT) > 0)
91 return S_FALSE;
92
93 const Package package = GetSparsePackage();
94 if (package == NULL)
95 return S_FALSE;
96
97 PackageManager packageManager;
98 winrt::hstring fullName = package.Id().FullName();
99 auto deploymentOperation = packageManager.RemovePackageAsync(fullName, RemovalOptions::RemoveForAllUsers);
100 auto deployResult = deploymentOperation.get();
101
102 if (FAILED(deployResult.ExtendedErrorCode()))
103 return deployResult.ExtendedErrorCode();
104
105 return S_OK;
106}
107
108STDAPI MediaInfo_SparsePackage::Installer::Install()
109{

Callers 2

InstallMethod · 0.85
UninstallMethod · 0.85

Calls 2

GetSparsePackageFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected