Module: wine Branch: master Commit: bdf7da9bdcde72a0589c477bc96bd47e08f00601 URL: http://source.winehq.org/git/wine.git/?a=commit;h=bdf7da9bdcde72a0589c477bc9...
Author: James Hawkins jhawkins@codeweavers.com Date: Tue Dec 9 00:21:15 2008 -0600
msi: Remove a duplicated function.
---
dlls/msi/msi.c | 8 ++++---- dlls/msi/msipriv.h | 1 - dlls/msi/registry.c | 32 +------------------------------- 3 files changed, 5 insertions(+), 36 deletions(-)
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 45fc728..d53cc91 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -619,7 +619,7 @@ UINT WINAPI MsiGetProductCodeW(LPCWSTR szComponent, LPWSTR szBuffer) return ERROR_INVALID_PARAMETER;
if (MSIREG_OpenUserDataComponentKey(szComponent, NULL, &compkey, FALSE) != ERROR_SUCCESS && - MSIREG_OpenLocalSystemComponentKey(szComponent, &compkey, FALSE) != ERROR_SUCCESS) + MSIREG_OpenUserDataComponentKey(szComponent, szLocalSid, &compkey, FALSE) != ERROR_SUCCESS) { return ERROR_UNKNOWN_COMPONENT; } @@ -1324,7 +1324,7 @@ static BOOL msi_comp_find_prodcode(LPWSTR squished_pc, UINT r;
if (context == MSIINSTALLCONTEXT_MACHINE) - r = MSIREG_OpenLocalSystemComponentKey(comp, &hkey, FALSE); + r = MSIREG_OpenUserDataComponentKey(comp, szLocalSid, &hkey, FALSE); else r = MSIREG_OpenUserDataComponentKey(comp, NULL, &hkey, FALSE);
@@ -1776,7 +1776,7 @@ static INSTALLSTATE MSI_GetComponentPath(LPCWSTR szProduct, LPCWSTR szComponent,
state = INSTALLSTATE_UNKNOWN;
- if (MSIREG_OpenLocalSystemComponentKey(szComponent, &hkey, FALSE) == ERROR_SUCCESS || + if (MSIREG_OpenUserDataComponentKey(szComponent, szLocalSid, &hkey, FALSE) == ERROR_SUCCESS || MSIREG_OpenUserDataComponentKey(szComponent, NULL, &hkey, FALSE) == ERROR_SUCCESS) { path = msi_reg_get_val_str(hkey, squished_pc); @@ -1802,7 +1802,7 @@ static INSTALLSTATE MSI_GetComponentPath(LPCWSTR szProduct, LPCWSTR szComponent, { RegCloseKey(hkey);
- if (MSIREG_OpenLocalSystemComponentKey(szComponent, &hkey, FALSE) == ERROR_SUCCESS || + if (MSIREG_OpenUserDataComponentKey(szComponent, szLocalSid, &hkey, FALSE) == ERROR_SUCCESS || MSIREG_OpenUserDataComponentKey(szComponent, NULL, &hkey, FALSE) == ERROR_SUCCESS) { msi_free(path); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 37d1d43..861cae8 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -786,7 +786,6 @@ extern UINT MSIREG_OpenUserUpgradeCodesKey(LPCWSTR szProduct, HKEY* key, BOOL cr extern UINT MSIREG_DeleteProductKey(LPCWSTR szProduct); extern UINT MSIREG_DeleteUserProductKey(LPCWSTR szProduct); extern UINT MSIREG_DeleteUserDataProductKey(LPCWSTR szProduct); -extern UINT MSIREG_OpenLocalSystemComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create); extern UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct); extern UINT MSIREG_DeleteLocalUserDataComponentKey(LPCWSTR szComponent); extern UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent); diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index bd56a72..2808d7f 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -187,16 +187,6 @@ static const WCHAR szInstallProperties_fmt[] = { '%','s','\','P','r','o','d','u','c','t','s','\','%','s','\', 'I','n','s','t','a','l','l','P','r','o','p','e','r','t','i','e','s',0};
-static const WCHAR szInstaller_LocalSystemComponent_fmt[] = { -'S','o','f','t','w','a','r','e','\', -'M','i','c','r','o','s','o','f','t','\', -'W','i','n','d','o','w','s','\', -'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\', -'I','n','s','t','a','l','l','e','r','\', -'U','s','e','r','D','a','t','a','\', -'S','-','1','-','5','-','1','8','\', -'C','o','m','p','o','n','e','n','t','s','\','%','s',0}; - static const WCHAR szInstaller_LocalClassesProd_fmt[] = { 'S','o','f','t','w','a','r','e','\', 'C','l','a','s','s','e','s','\', @@ -1039,26 +1029,6 @@ UINT MSIREG_DeleteUserUpgradeCodesKey(LPCWSTR szUpgradeCode) return RegDeleteTreeW(HKEY_CURRENT_USER, keypath); }
-UINT MSIREG_OpenLocalSystemComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create) -{ - WCHAR squished_pc[GUID_SIZE]; - WCHAR keypath[0x200]; - - TRACE("%s\n", debugstr_w(szComponent)); - - if (!squash_guid(szComponent, squished_pc)) - return ERROR_FUNCTION_FAILED; - - TRACE("squished (%s)\n", debugstr_w(squished_pc)); - - sprintfW(keypath, szInstaller_LocalSystemComponent_fmt, squished_pc); - - if (create) - return RegCreateKeyW(HKEY_LOCAL_MACHINE, keypath, key); - - return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key); -} - UINT MSIREG_DeleteLocalClassesProductKey(LPCWSTR szProductCode) { WCHAR squished_pc[GUID_SIZE]; @@ -1386,7 +1356,7 @@ UINT WINAPI MsiEnumClientsW(LPCWSTR szComponent, DWORD index, LPWSTR szProduct) return ERROR_INVALID_PARAMETER;
if (MSIREG_OpenUserDataComponentKey(szComponent, NULL, &hkeyComp, FALSE) != ERROR_SUCCESS && - MSIREG_OpenLocalSystemComponentKey(szComponent, &hkeyComp, FALSE) != ERROR_SUCCESS) + MSIREG_OpenUserDataComponentKey(szComponent, szLocalSid, &hkeyComp, FALSE) != ERROR_SUCCESS) return ERROR_UNKNOWN_COMPONENT;
/* see if there are any products at all */