'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
'I','n','s','t','a','l','l','e','r','\\','C','o','m','p','o','n','e','n','t','s','\\',0};
+static const WCHAR szInstaller_Components[] = {
+ 'S','o','f','t','w','a','r','e','\\','C','l','a','s','s','e','s','\\',
+ 'I','n','s','t','a','l','l','e','r','\\','C','o','m','p','o','n','e','n','t','s','\\',0};
+
static const WCHAR szUserFeatures[] = {
'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
'I','n','s','t','a','l','l','e','r','\\','F','e','a','t','u','r','e','s','\\',0};
strcpyW(keypath, szUninstall);
strcatW(keypath, product);
}
- return SHDeleteKeyW(HKEY_LOCAL_MACHINE, keypath);
+ return RegDeleteTreeW(HKEY_LOCAL_MACHINE, keypath);
}
UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create)
strcpyW(keypath, szUserProducts);
strcatW(keypath, squished_pc);
- return SHDeleteKeyW(HKEY_CURRENT_USER, keypath);
+ return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
}
UINT MSIREG_OpenUserPatchesKey(LPCWSTR szPatch, HKEY *key, BOOL create)
strcpyW(keypath, szUserFeatures);
strcatW(keypath, squished_pc);
- return SHDeleteKeyW(HKEY_CURRENT_USER, keypath);
+ return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
}
static UINT MSIREG_OpenInstallerFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create)
UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY *key, BOOL create)
{
WCHAR squished_cc[GUID_SIZE], keypath[0x200];
+ UINT ret;
if (!squash_guid(szComponent, squished_cc)) return ERROR_FUNCTION_FAILED;
TRACE("%s squished %s\n", debugstr_w(szComponent), debugstr_w(squished_cc));
strcatW(keypath, squished_cc);
if (create) return RegCreateKeyW(HKEY_CURRENT_USER, keypath, key);
- return RegOpenKeyW(HKEY_CURRENT_USER, keypath, key);
+ ret = RegOpenKeyW(HKEY_CURRENT_USER, keypath, key);
+ if (ret != ERROR_FILE_NOT_FOUND) return ret;
+
+ strcpyW(keypath, szInstaller_Components);
+ strcatW(keypath, squished_cc);
+ return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
}
UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid, HKEY *key, BOOL create)
sprintfW(keypath, szUserDataComponents_fmt, szUserSid);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
- r = SHDeleteKeyW(hkey, comp);
+ r = RegDeleteTreeW(hkey, comp);
RegCloseKey(hkey);
return r;
}
LocalFree(usersid);
}
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
- r = SHDeleteKeyW(hkey, squished_patch);
+ r = RegDeleteTreeW(hkey, squished_patch);
RegCloseKey(hkey);
return r;
}
LocalFree(usersid);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
- r = SHDeleteKeyW(hkey, squished_pc);
+ r = RegDeleteTreeW(hkey, squished_pc);
RegCloseKey(hkey);
return r;
}
TRACE("%s squished %s\n", debugstr_w(szProduct), debugstr_w(squished_pc));
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_Products, 0, access, &hkey)) return ERROR_SUCCESS;
- r = SHDeleteKeyW(hkey, squished_pc);
+ r = RegDeleteTreeW(hkey, squished_pc);
RegCloseKey(hkey);
return r;
}
strcpyW(keypath, szInstaller_UserUpgradeCodes);
strcatW(keypath, squished_pc);
- return SHDeleteKeyW(HKEY_CURRENT_USER, keypath);
+ return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
}
UINT MSIREG_DeleteLocalClassesProductKey(LPCWSTR szProductCode)
TRACE("%s squished %s\n", debugstr_w(szProductCode), debugstr_w(squished_pc));
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_LocalClassesProducts, 0, access, &hkey)) return ERROR_SUCCESS;
- r = SHDeleteKeyW(hkey, squished_pc);
+ r = RegDeleteTreeW(hkey, squished_pc);
RegCloseKey(hkey);
return r;
}
TRACE("%s squished %s\n", debugstr_w(szProductCode), debugstr_w(squished_pc));
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_LocalClassesFeatures, 0, access, &hkey)) return ERROR_SUCCESS;
- r = SHDeleteKeyW(hkey, squished_pc);
+ r = RegDeleteTreeW(hkey, squished_pc);
RegCloseKey(hkey);
return r;
}
TRACE("%s squished %s\n", debugstr_w(szUpgradeCode), debugstr_w(squished_pc));
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_ClassesUpgradeCodes, 0, access, &hkey)) return ERROR_SUCCESS;
- r = SHDeleteKeyW(hkey, squished_pc);
+ r = RegDeleteTreeW(hkey, squished_pc);
RegCloseKey(hkey);
return r;
}