diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 8dd2476eec5..fd6050567a4 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 b2664e62d2a..dbe2acf9d95 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 6f5299ce6e2..47810925db3 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 c8ea83f5eb6..3f173e0273e 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;