James Hawkins : msi: Add the ability to open multiple users' install properties key.
Alexandre Julliard
julliard at winehq.org
Tue Dec 9 06:24:37 CST 2008
Module: wine
Branch: master
Commit: 98c703ab8788eb677c4247be61a38e31d980dcb0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=98c703ab8788eb677c4247be61a38e31d980dcb0
Author: James Hawkins <jhawkins at codeweavers.com>
Date: Tue Dec 9 00:21:04 2008 -0600
msi: Add the ability to open multiple users' install properties key.
---
dlls/msi/action.c | 5 +++--
dlls/msi/msi.c | 8 ++++----
dlls/msi/msipriv.h | 3 ++-
dlls/msi/registry.c | 10 ++--------
4 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 8dd2476..fd60505 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -4170,7 +4170,8 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
if (package->Context == MSIINSTALLCONTEXT_MACHINE)
{
- rc = MSIREG_OpenLocalSystemInstallProps(package->ProductCode, &props, TRUE);
+ rc = MSIREG_OpenInstallProps(package->ProductCode, szLocalSid,
+ &props, TRUE);
if (rc != ERROR_SUCCESS)
goto done;
}
@@ -4438,7 +4439,7 @@ static UINT ACTION_RegisterUser(MSIPACKAGE *package)
return ERROR_SUCCESS;
if (package->Context == MSIINSTALLCONTEXT_MACHINE)
- rc = MSIREG_OpenLocalSystemInstallProps(package->ProductCode, &hkey, TRUE);
+ rc = MSIREG_OpenInstallProps(package->ProductCode, szLocalSid, &hkey, TRUE);
else
rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &hkey, TRUE);
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index b2664e6..dbe2acf 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -108,7 +108,7 @@ static UINT MSI_OpenProductW(LPCWSTR szProduct, MSIPACKAGE **package)
return r;
if (context == MSIINSTALLCONTEXT_MACHINE)
- r = MSIREG_OpenLocalSystemInstallProps(szProduct, &props, FALSE);
+ r = MSIREG_OpenInstallProps(szProduct, szLocalSid, &props, FALSE);
else if (context == MSIINSTALLCONTEXT_USERMANAGED ||
context == MSIINSTALLCONTEXT_USERUNMANAGED)
r = MSIREG_OpenCurrentUserInstallProps(szProduct, &props, FALSE);
@@ -407,7 +407,7 @@ static UINT msi_open_package(LPCWSTR product, MSIINSTALLCONTEXT context,
'L','o','c','a','l','P','a','c','k','a','g','e',0};
if (context == MSIINSTALLCONTEXT_MACHINE)
- r = MSIREG_OpenLocalSystemInstallProps(product, &props, FALSE);
+ r = MSIREG_OpenInstallProps(product, szLocalSid, &props, FALSE);
else
r = MSIREG_OpenCurrentUserInstallProps(product, &props, FALSE);
@@ -1448,7 +1448,7 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
}
else
{
- r = MSIREG_OpenLocalSystemInstallProps(szProduct, &userdata, FALSE);
+ r = MSIREG_OpenInstallProps(szProduct, szLocalSid, &userdata, FALSE);
if (r != ERROR_SUCCESS)
goto done;
}
@@ -2449,7 +2449,7 @@ static USERINFOSTATE MSI_GetUserInfo(LPCWSTR szProduct,
}
if (MSIREG_OpenCurrentUserInstallProps(szProduct, &props, FALSE) != ERROR_SUCCESS &&
- MSIREG_OpenLocalSystemInstallProps(szProduct, &props, FALSE) != ERROR_SUCCESS)
+ MSIREG_OpenInstallProps(szProduct, szLocalSid, &props, FALSE) != ERROR_SUCCESS)
{
RegCloseKey(hkey);
return USERINFOSTATE_ABSENT;
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index 6f5299c..4781092 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -779,7 +779,8 @@ extern UINT MSIREG_OpenPatchesKey(LPCWSTR szPatch, HKEY* key, BOOL create);
extern UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, LPCWSTR szUserSid,
HKEY* key, BOOL create);
extern UINT MSIREG_OpenCurrentUserInstallProps(LPCWSTR szProduct, HKEY* key, BOOL create);
-extern UINT MSIREG_OpenLocalSystemInstallProps(LPCWSTR szProduct, HKEY* key, BOOL create);
+extern UINT MSIREG_OpenInstallProps(LPCWSTR szProduct, LPCWSTR szUserSID,
+ HKEY *key, BOOL create);
extern UINT MSIREG_OpenUpgradeCodesKey(LPCWSTR szProduct, HKEY* key, BOOL create);
extern UINT MSIREG_OpenUserUpgradeCodesKey(LPCWSTR szProduct, HKEY* key, BOOL create);
extern UINT MSIREG_DeleteProductKey(LPCWSTR szProduct);
diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c
index c8ea83f..3f173e0 100644
--- a/dlls/msi/registry.c
+++ b/dlls/msi/registry.c
@@ -890,8 +890,8 @@ UINT MSIREG_OpenUserDataPatchKey(LPWSTR patch, HKEY *key, BOOL create)
return rc;
}
-static UINT MSIREG_OpenInstallProps(LPCWSTR szProduct, LPCWSTR szUserSID,
- HKEY *key, BOOL create)
+UINT MSIREG_OpenInstallProps(LPCWSTR szProduct, LPCWSTR szUserSID,
+ HKEY *key, BOOL create)
{
UINT rc;
WCHAR squished_pc[GUID_SIZE];
@@ -931,12 +931,6 @@ UINT MSIREG_OpenCurrentUserInstallProps(LPCWSTR szProduct, HKEY *key,
return rc;
}
-UINT MSIREG_OpenLocalSystemInstallProps(LPCWSTR szProduct, HKEY *key,
- BOOL create)
-{
- return MSIREG_OpenInstallProps(szProduct, szLocalSid, key, create);
-}
-
UINT MSIREG_DeleteUserDataProductKey(LPCWSTR szProduct)
{
UINT rc;
More information about the wine-cvs
mailing list