James Hawkins : msi: Open the install properties key based on the install context.
Alexandre Julliard
julliard at winehq.org
Mon Apr 7 06:50:20 CDT 2008
Module: wine
Branch: master
Commit: bcba82dc0c7b965ceaa15e82bc67658d129ef09b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bcba82dc0c7b965ceaa15e82bc67658d129ef09b
Author: James Hawkins <jhawkins at codeweavers.com>
Date: Sat Apr 5 06:02:04 2008 -0500
msi: Open the install properties key based on the install context.
---
dlls/msi/action.c | 29 +++++++++++++++++++++--------
1 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index ff93124..43ada4c 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -3350,6 +3350,10 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
rc = MSIREG_OpenLocalClassesProductKey(package->ProductCode, &hukey, TRUE);
if (rc != ERROR_SUCCESS)
goto end;
+
+ rc = MSIREG_OpenLocalSystemInstallProps(package->ProductCode, &props, TRUE);
+ if (rc != ERROR_SUCCESS)
+ goto end;
}
else
{
@@ -3360,6 +3364,10 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
rc = MSIREG_OpenUserProductsKey(package->ProductCode,&hukey,TRUE);
if (rc != ERROR_SUCCESS)
goto end;
+
+ rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &props, TRUE);
+ if (rc != ERROR_SUCCESS)
+ goto end;
}
rc = RegCreateKeyW(hukey, szSourceList, &source);
@@ -3372,10 +3380,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
if (rc != ERROR_SUCCESS)
goto end;
- rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &props, TRUE);
- if (rc != ERROR_SUCCESS)
- goto end;
-
buffer = msi_dup_property( package, INSTALLPROPERTY_PRODUCTNAMEW );
msi_reg_set_val_str( hukey, INSTALLPROPERTY_PRODUCTNAMEW, buffer );
msi_free(buffer);
@@ -3995,9 +3999,18 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
if (rc != ERROR_SUCCESS)
return rc;
- rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &props, TRUE);
- if (rc != ERROR_SUCCESS)
- return rc;
+ if (package->Context == MSIINSTALLCONTEXT_MACHINE)
+ {
+ rc = MSIREG_OpenLocalSystemInstallProps(package->ProductCode, &props, TRUE);
+ if (rc != ERROR_SUCCESS)
+ return rc;
+ }
+ else
+ {
+ rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &props, TRUE);
+ if (rc != ERROR_SUCCESS)
+ return rc;
+ }
/* dump all the info i can grab */
/* FIXME: Flesh out more information */
@@ -4069,7 +4082,7 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
msi_free(upgrade_code);
}
-
+
RegCloseKey(hkey);
rc = MSIREG_OpenUserDataProductKey(package->ProductCode, &hudkey, TRUE);
More information about the wine-cvs
mailing list