Commit e4d19fc4 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Explicitly pass product code and platform to MSIREG_OpenUninstallKey and…

msi: Explicitly pass product code and platform to MSIREG_OpenUninstallKey and MSIREG_DeleteUninstallKey.
parent 6ad992c4
......@@ -5286,7 +5286,7 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
if (!msi_check_publish(package))
return ERROR_SUCCESS;
rc = MSIREG_OpenUninstallKey(package, &hkey, TRUE);
rc = MSIREG_OpenUninstallKey(package->ProductCode, package->platform, &hkey, TRUE);
if (rc != ERROR_SUCCESS)
return rc;
......@@ -5366,7 +5366,7 @@ static UINT msi_unpublish_product(MSIPACKAGE *package, WCHAR *remove)
MSIREG_DeleteProductKey(package->ProductCode);
MSIREG_DeleteUserDataProductKey(package->ProductCode);
MSIREG_DeleteUninstallKey(package);
MSIREG_DeleteUninstallKey(package->ProductCode, package->platform);
MSIREG_DeleteLocalClassesProductKey(package->ProductCode);
MSIREG_DeleteLocalClassesFeaturesKey(package->ProductCode);
......
......@@ -829,8 +829,8 @@ extern BOOL unsquash_guid(LPCWSTR in, LPWSTR out);
extern BOOL squash_guid(LPCWSTR in, LPWSTR out);
extern BOOL encode_base85_guid(GUID *,LPWSTR);
extern BOOL decode_base85_guid(LPCWSTR,GUID*);
extern UINT MSIREG_OpenUninstallKey(MSIPACKAGE *package, HKEY *key, BOOL create);
extern UINT MSIREG_DeleteUninstallKey(MSIPACKAGE *package);
extern UINT MSIREG_OpenUninstallKey(const WCHAR *, enum platform, HKEY *, BOOL);
extern UINT MSIREG_DeleteUninstallKey(const WCHAR *, enum platform);
extern UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid,
MSIINSTALLCONTEXT context, HKEY* key, BOOL create);
extern UINT MSIREG_OpenFeaturesKey(LPCWSTR szProduct, MSIINSTALLCONTEXT context,
......
......@@ -449,7 +449,7 @@ static UINT set_installed_prop( MSIPACKAGE *package )
HKEY hkey = 0;
UINT r;
r = MSIREG_OpenUninstallKey( package, &hkey, FALSE );
r = MSIREG_OpenUninstallKey( package->ProductCode, package->platform, &hkey, FALSE );
if (r == ERROR_SUCCESS)
{
RegCloseKey( hkey );
......
......@@ -525,17 +525,17 @@ static WCHAR *get_user_sid(void)
return ret;
}
UINT MSIREG_OpenUninstallKey(MSIPACKAGE *package, HKEY *key, BOOL create)
UINT MSIREG_OpenUninstallKey(const WCHAR *product, enum platform platform, HKEY *key, BOOL create)
{
UINT rc;
WCHAR keypath[0x200];
TRACE("%s\n", debugstr_w(package->ProductCode));
TRACE("%s\n", debugstr_w(product));
if (is_64bit && package->platform == PLATFORM_INTEL)
sprintfW(keypath, szUninstall_32node_fmt, package->ProductCode);
if (is_64bit && platform == PLATFORM_INTEL)
sprintfW(keypath, szUninstall_32node_fmt, product);
else
sprintfW(keypath, szUninstall_fmt, package->ProductCode);
sprintfW(keypath, szUninstall_fmt, product);
if (create)
rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, KEY_ALL_ACCESS, NULL, key, NULL);
......@@ -545,16 +545,16 @@ UINT MSIREG_OpenUninstallKey(MSIPACKAGE *package, HKEY *key, BOOL create)
return rc;
}
UINT MSIREG_DeleteUninstallKey(MSIPACKAGE *package)
UINT MSIREG_DeleteUninstallKey(const WCHAR *product, enum platform platform)
{
WCHAR keypath[0x200];
TRACE("%s\n", debugstr_w(package->ProductCode));
TRACE("%s\n", debugstr_w(product));
if (is_64bit && package->platform == PLATFORM_INTEL)
sprintfW(keypath, szUninstall_32node_fmt, package->ProductCode);
if (is_64bit && platform == PLATFORM_INTEL)
sprintfW(keypath, szUninstall_32node_fmt, product);
else
sprintfW(keypath, szUninstall_fmt, package->ProductCode);
sprintfW(keypath, szUninstall_fmt, product);
return RegDeleteTreeW(HKEY_LOCAL_MACHINE, keypath);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment