mirror of
https://github.com/reactos/wine.git
synced 2025-02-28 16:56:24 +00:00
msi: Explicitly pass product code and platform to MSIREG_OpenUninstallKey and MSIREG_DeleteUninstallKey.
This commit is contained in:
parent
6ad992c407
commit
e4d19fc47b
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user