mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 19:25:51 +00:00
[MSI]
* Do not rely on RegDeleteTreeW which shouldn't be exported. CORE-8174 svn path=/trunk/; revision=63557
This commit is contained in:
parent
8db88e6145
commit
ce53530645
3 changed files with 17 additions and 17 deletions
|
@ -2989,7 +2989,7 @@ static void delete_tree( HKEY root, const WCHAR *path )
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
|
|
||||||
if (!(hkey = open_key( root, path, FALSE ))) return;
|
if (!(hkey = open_key( root, path, FALSE ))) return;
|
||||||
res = RegDeleteTreeW( hkey, NULL );
|
res = SHDeleteKeyW( hkey, NULL );
|
||||||
if (res) TRACE("failed to delete subtree of %s (%d)\n", debugstr_w(path), res);
|
if (res) TRACE("failed to delete subtree of %s (%d)\n", debugstr_w(path), res);
|
||||||
delete_key( root, path );
|
delete_key( root, path );
|
||||||
RegCloseKey( hkey );
|
RegCloseKey( hkey );
|
||||||
|
|
|
@ -953,7 +953,7 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package )
|
||||||
|
|
||||||
cls->action = INSTALLSTATE_ABSENT;
|
cls->action = INSTALLSTATE_ABSENT;
|
||||||
|
|
||||||
res = RegDeleteTreeW( hkey, cls->clsid );
|
res = SHDeleteKeyW( hkey, cls->clsid );
|
||||||
if (res != ERROR_SUCCESS)
|
if (res != ERROR_SUCCESS)
|
||||||
WARN("Failed to delete class key %d\n", res);
|
WARN("Failed to delete class key %d\n", res);
|
||||||
|
|
||||||
|
@ -975,7 +975,7 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package )
|
||||||
{
|
{
|
||||||
strcpyW( filetype, szFileType );
|
strcpyW( filetype, szFileType );
|
||||||
strcatW( filetype, cls->clsid );
|
strcatW( filetype, cls->clsid );
|
||||||
res = RegDeleteTreeW( HKEY_CLASSES_ROOT, filetype );
|
res = SHDeleteKeyW( HKEY_CLASSES_ROOT, filetype );
|
||||||
msi_free( filetype );
|
msi_free( filetype );
|
||||||
|
|
||||||
if (res != ERROR_SUCCESS)
|
if (res != ERROR_SUCCESS)
|
||||||
|
@ -1148,7 +1148,7 @@ UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package )
|
||||||
}
|
}
|
||||||
TRACE("Unregistering progid %s\n", debugstr_w(progid->ProgID));
|
TRACE("Unregistering progid %s\n", debugstr_w(progid->ProgID));
|
||||||
|
|
||||||
res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid->ProgID );
|
res = SHDeleteKeyW( HKEY_CLASSES_ROOT, progid->ProgID );
|
||||||
if (res != ERROR_SUCCESS)
|
if (res != ERROR_SUCCESS)
|
||||||
TRACE("Failed to delete progid key %d\n", res);
|
TRACE("Failed to delete progid key %d\n", res);
|
||||||
|
|
||||||
|
@ -1392,7 +1392,7 @@ UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package )
|
||||||
{
|
{
|
||||||
extension[0] = '.';
|
extension[0] = '.';
|
||||||
strcpyW( extension + 1, ext->Extension );
|
strcpyW( extension + 1, ext->Extension );
|
||||||
res = RegDeleteTreeW( HKEY_CLASSES_ROOT, extension );
|
res = SHDeleteKeyW( HKEY_CLASSES_ROOT, extension );
|
||||||
msi_free( extension );
|
msi_free( extension );
|
||||||
if (res != ERROR_SUCCESS)
|
if (res != ERROR_SUCCESS)
|
||||||
WARN("Failed to delete extension key %d\n", res);
|
WARN("Failed to delete extension key %d\n", res);
|
||||||
|
@ -1414,7 +1414,7 @@ UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package )
|
||||||
{
|
{
|
||||||
strcpyW( progid_shell, progid );
|
strcpyW( progid_shell, progid );
|
||||||
strcatW( progid_shell, shellW );
|
strcatW( progid_shell, shellW );
|
||||||
res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid_shell );
|
res = SHDeleteKeyW( HKEY_CLASSES_ROOT, progid_shell );
|
||||||
msi_free( progid_shell );
|
msi_free( progid_shell );
|
||||||
if (res != ERROR_SUCCESS)
|
if (res != ERROR_SUCCESS)
|
||||||
WARN("Failed to delete shell key %d\n", res);
|
WARN("Failed to delete shell key %d\n", res);
|
||||||
|
|
|
@ -477,7 +477,7 @@ UINT MSIREG_DeleteUninstallKey(const WCHAR *product, enum platform platform)
|
||||||
strcpyW(keypath, szUninstall);
|
strcpyW(keypath, szUninstall);
|
||||||
strcatW(keypath, product);
|
strcatW(keypath, product);
|
||||||
}
|
}
|
||||||
return RegDeleteTreeW(HKEY_LOCAL_MACHINE, keypath);
|
return SHDeleteKeyW(HKEY_LOCAL_MACHINE, keypath);
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create)
|
UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create)
|
||||||
|
@ -528,7 +528,7 @@ UINT MSIREG_DeleteUserProductKey(LPCWSTR szProduct)
|
||||||
|
|
||||||
strcpyW(keypath, szUserProducts);
|
strcpyW(keypath, szUserProducts);
|
||||||
strcatW(keypath, squished_pc);
|
strcatW(keypath, squished_pc);
|
||||||
return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
|
return SHDeleteKeyW(HKEY_CURRENT_USER, keypath);
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT MSIREG_OpenUserPatchesKey(LPCWSTR szPatch, HKEY *key, BOOL create)
|
UINT MSIREG_OpenUserPatchesKey(LPCWSTR szPatch, HKEY *key, BOOL create)
|
||||||
|
@ -593,7 +593,7 @@ UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct)
|
||||||
|
|
||||||
strcpyW(keypath, szUserFeatures);
|
strcpyW(keypath, szUserFeatures);
|
||||||
strcatW(keypath, squished_pc);
|
strcatW(keypath, squished_pc);
|
||||||
return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
|
return SHDeleteKeyW(HKEY_CURRENT_USER, keypath);
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT MSIREG_OpenInstallerFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create)
|
static UINT MSIREG_OpenInstallerFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create)
|
||||||
|
@ -707,7 +707,7 @@ UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid)
|
||||||
sprintfW(keypath, szUserDataComponents_fmt, szUserSid);
|
sprintfW(keypath, szUserDataComponents_fmt, szUserSid);
|
||||||
|
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
|
||||||
r = RegDeleteTreeW(hkey, comp);
|
r = SHDeleteKeyW(hkey, comp);
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -788,7 +788,7 @@ UINT MSIREG_DeleteUserDataPatchKey(LPCWSTR patch, MSIINSTALLCONTEXT context)
|
||||||
LocalFree(usersid);
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
|
||||||
r = RegDeleteTreeW(hkey, squished_patch);
|
r = SHDeleteKeyW(hkey, squished_patch);
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -865,7 +865,7 @@ UINT MSIREG_DeleteUserDataProductKey(LPCWSTR szProduct)
|
||||||
LocalFree(usersid);
|
LocalFree(usersid);
|
||||||
|
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
|
||||||
r = RegDeleteTreeW(hkey, squished_pc);
|
r = SHDeleteKeyW(hkey, squished_pc);
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -881,7 +881,7 @@ UINT MSIREG_DeleteProductKey(LPCWSTR szProduct)
|
||||||
TRACE("%s squished %s\n", debugstr_w(szProduct), debugstr_w(squished_pc));
|
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;
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_Products, 0, access, &hkey)) return ERROR_SUCCESS;
|
||||||
r = RegDeleteTreeW(hkey, squished_pc);
|
r = SHDeleteKeyW(hkey, squished_pc);
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -938,7 +938,7 @@ UINT MSIREG_DeleteUserUpgradeCodesKey(LPCWSTR szUpgradeCode)
|
||||||
|
|
||||||
strcpyW(keypath, szInstaller_UserUpgradeCodes);
|
strcpyW(keypath, szInstaller_UserUpgradeCodes);
|
||||||
strcatW(keypath, squished_pc);
|
strcatW(keypath, squished_pc);
|
||||||
return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
|
return SHDeleteKeyW(HKEY_CURRENT_USER, keypath);
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT MSIREG_DeleteLocalClassesProductKey(LPCWSTR szProductCode)
|
UINT MSIREG_DeleteLocalClassesProductKey(LPCWSTR szProductCode)
|
||||||
|
@ -952,7 +952,7 @@ UINT MSIREG_DeleteLocalClassesProductKey(LPCWSTR szProductCode)
|
||||||
TRACE("%s squished %s\n", debugstr_w(szProductCode), debugstr_w(squished_pc));
|
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;
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_LocalClassesProducts, 0, access, &hkey)) return ERROR_SUCCESS;
|
||||||
r = RegDeleteTreeW(hkey, squished_pc);
|
r = SHDeleteKeyW(hkey, squished_pc);
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -968,7 +968,7 @@ UINT MSIREG_DeleteLocalClassesFeaturesKey(LPCWSTR szProductCode)
|
||||||
TRACE("%s squished %s\n", debugstr_w(szProductCode), debugstr_w(squished_pc));
|
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;
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_LocalClassesFeatures, 0, access, &hkey)) return ERROR_SUCCESS;
|
||||||
r = RegDeleteTreeW(hkey, squished_pc);
|
r = SHDeleteKeyW(hkey, squished_pc);
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -999,7 +999,7 @@ UINT MSIREG_DeleteClassesUpgradeCodesKey(LPCWSTR szUpgradeCode)
|
||||||
TRACE("%s squished %s\n", debugstr_w(szUpgradeCode), debugstr_w(squished_pc));
|
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;
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_ClassesUpgradeCodes, 0, access, &hkey)) return ERROR_SUCCESS;
|
||||||
r = RegDeleteTreeW(hkey, squished_pc);
|
r = SHDeleteKeyW(hkey, squished_pc);
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue