msi: Add the ability to open multiple users' install properties key.
This commit is contained in:
parent
b198f4f23f
commit
98c703ab87
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -890,7 +890,7 @@ UINT MSIREG_OpenUserDataPatchKey(LPWSTR patch, HKEY *key, BOOL create)
|
|||
return rc;
|
||||
}
|
||||
|
||||
static UINT MSIREG_OpenInstallProps(LPCWSTR szProduct, LPCWSTR szUserSID,
|
||||
UINT MSIREG_OpenInstallProps(LPCWSTR szProduct, LPCWSTR szUserSID,
|
||||
HKEY *key, BOOL create)
|
||||
{
|
||||
UINT rc;
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue