msi: Add the ability to open multiple users' install properties key.
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 @@
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 @@
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 @@
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 @@
'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 @@
}
else
{
- r = MSIREG_OpenLocalSystemInstallProps(szProduct, &userdata, FALSE);
+ r = MSIREG_OpenInstallProps(szProduct, szLocalSid, &userdata, FALSE);
if (r != ERROR_SUCCESS)
goto done;
}
@@ -2449,7 +2449,7 @@
}
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_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 @@
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 @@
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;