msi: Clean up better when removing a product.
This commit is contained in:
parent
8933013b62
commit
701f14801f
|
@ -5139,21 +5139,16 @@ static UINT msi_unpublish_product(MSIPACKAGE *package, WCHAR *remove)
|
|||
MSIREG_DeleteUserDataProductKey(package->ProductCode);
|
||||
MSIREG_DeleteUninstallKey(package);
|
||||
|
||||
if (package->Context == MSIINSTALLCONTEXT_MACHINE)
|
||||
{
|
||||
MSIREG_DeleteLocalClassesProductKey(package->ProductCode);
|
||||
MSIREG_DeleteLocalClassesFeaturesKey(package->ProductCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
MSIREG_DeleteUserProductKey(package->ProductCode);
|
||||
MSIREG_DeleteUserFeaturesKey(package->ProductCode);
|
||||
}
|
||||
|
||||
upgrade = msi_dup_property(package->db, szUpgradeCode);
|
||||
if (upgrade)
|
||||
{
|
||||
MSIREG_DeleteUserUpgradeCodesKey(upgrade);
|
||||
MSIREG_DeleteClassesUpgradeCodesKey(upgrade);
|
||||
msi_free(upgrade);
|
||||
}
|
||||
|
||||
|
|
|
@ -836,6 +836,7 @@ extern UINT MSIREG_DeleteUserDataProductKey(LPCWSTR szProduct);
|
|||
extern UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct);
|
||||
extern UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid);
|
||||
extern UINT MSIREG_DeleteUserUpgradeCodesKey(LPCWSTR szUpgradeCode);
|
||||
extern UINT MSIREG_DeleteClassesUpgradeCodesKey(LPCWSTR szUpgradeCode);
|
||||
extern UINT MSIREG_OpenClassesUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL create);
|
||||
extern UINT MSIREG_DeleteLocalClassesProductKey(LPCWSTR szProductCode);
|
||||
extern UINT MSIREG_DeleteLocalClassesFeaturesKey(LPCWSTR szProductCode);
|
||||
|
|
|
@ -1182,6 +1182,21 @@ UINT MSIREG_OpenClassesUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL cr
|
|||
return RegOpenKeyW(HKEY_CLASSES_ROOT, keypath, key);
|
||||
}
|
||||
|
||||
UINT MSIREG_DeleteClassesUpgradeCodesKey(LPCWSTR szUpgradeCode)
|
||||
{
|
||||
WCHAR squished_pc[GUID_SIZE];
|
||||
WCHAR keypath[0x200];
|
||||
|
||||
TRACE("%s\n", debugstr_w(szUpgradeCode));
|
||||
if (!squash_guid(szUpgradeCode, squished_pc))
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
TRACE("squished (%s)\n", debugstr_w(squished_pc));
|
||||
|
||||
sprintfW(keypath, szInstaller_ClassesUpgrade_fmt, squished_pc);
|
||||
|
||||
return RegDeleteTreeW(HKEY_CLASSES_ROOT, keypath);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* MsiDecomposeDescriptorW [MSI.@]
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue