[05/10] msi: Explicitly pass product code and platform to MSIREG_OpenUninstallKey and MSIREG_DeleteUninstallKey.
Hans Leidekker
hans at codeweavers.com
Wed Mar 30 05:31:04 CDT 2011
---
dlls/msi/action.c | 4 ++--
dlls/msi/msipriv.h | 4 ++--
dlls/msi/package.c | 2 +-
dlls/msi/registry.c | 20 ++++++++++----------
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index a21f234..abee14c 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -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);
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index 7af99a6..19e9be8 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -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,
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index 00ed9f8..88cf34d 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -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 );
diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c
index e146d82..60deeb9 100644
--- a/dlls/msi/registry.c
+++ b/dlls/msi/registry.c
@@ -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);
}
--
1.7.1
More information about the wine-patches
mailing list