Signed-off-by: Hans Leidekker hans@codeweavers.com --- dlls/msi/classes.c | 25 ++++++++++++------------- dlls/msi/msipriv.h | 1 - 2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/dlls/msi/classes.c b/dlls/msi/classes.c index 293aa1063b..7b0a4a4d0e 100644 --- a/dlls/msi/classes.c +++ b/dlls/msi/classes.c @@ -747,7 +747,7 @@ static UINT register_appid(const MSIAPPID *appid, LPCWSTR app ) UINT ACTION_RegisterClassInfo(MSIPACKAGE *package) { static const WCHAR szFileType_fmt[] = {'F','i','l','e','T','y','p','e','\','%','s','\','%','i',0}; - const WCHAR *keypath; + REGSAM access = KEY_ALL_ACCESS; MSIRECORD *uirow; HKEY hkey, hkey2, hkey3; MSICLASS *cls; @@ -760,12 +760,12 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package) if (r != ERROR_SUCCESS) return r;
- if (is_64bit && package->platform == PLATFORM_INTEL) - keypath = szWow6432NodeCLSID; + if (package->platform == PLATFORM_INTEL) + access |= KEY_WOW64_32KEY; else - keypath = szCLSID; + access |= KEY_WOW64_64KEY;
- if (RegCreateKeyW(HKEY_CLASSES_ROOT, keypath, &hkey) != ERROR_SUCCESS) + if (RegCreateKeyExW( HKEY_CLASSES_ROOT, szCLSID, 0, NULL, 0, access, NULL, &hkey, NULL )) return ERROR_FUNCTION_FAILED;
LIST_FOR_EACH_ENTRY( cls, &package->classes, MSICLASS, entry ) @@ -873,7 +873,6 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
if (cls->DefInprocHandler32) msi_reg_set_subkey_val( hkey2, szInprocHandler32, NULL, cls->DefInprocHandler32 ); - RegCloseKey(hkey2);
/* if there is a FileTypeMask, register the FileType */ @@ -902,7 +901,7 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package) index ++; } } - + uirow = MSI_CreateRecord(1); MSI_RecordSetStringW( uirow, 1, cls->clsid ); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, uirow); @@ -915,7 +914,7 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package) UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package ) { static const WCHAR szFileType[] = {'F','i','l','e','T','y','p','e','\',0}; - const WCHAR *keypath; + REGSAM access = KEY_ALL_ACCESS; MSIRECORD *uirow; MSICLASS *cls; HKEY hkey, hkey2; @@ -928,13 +927,13 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package ) if (r != ERROR_SUCCESS) return r;
- if (is_64bit && package->platform == PLATFORM_INTEL) - keypath = szWow6432NodeCLSID; + if (package->platform == PLATFORM_INTEL) + access |= KEY_WOW64_32KEY; else - keypath = szCLSID; + access |= KEY_WOW64_64KEY;
- if (RegOpenKeyW( HKEY_CLASSES_ROOT, keypath, &hkey ) != ERROR_SUCCESS) - return ERROR_SUCCESS; + if (RegCreateKeyExW( HKEY_CLASSES_ROOT, szCLSID, 0, NULL, 0, access, NULL, &hkey, NULL )) + return ERROR_FUNCTION_FAILED;
LIST_FOR_EACH_ENTRY( cls, &package->classes, MSICLASS, entry ) { diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index dbab8e2292..8354882e80 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -1207,7 +1207,6 @@ static const WCHAR szX64[] = {'x','6','4',0}; static const WCHAR szAMD64[] = {'A','M','D','6','4',0}; static const WCHAR szARM[] = {'A','r','m',0}; static const WCHAR szARM64[] = {'A','r','m','6','4',0}; -static const WCHAR szWow6432NodeCLSID[] = {'W','o','w','6','4','3','2','N','o','d','e','\','C','L','S','I','D',0}; static const WCHAR szStreams[] = {'_','S','t','r','e','a','m','s',0}; static const WCHAR szStorages[] = {'_','S','t','o','r','a','g','e','s',0}; static const WCHAR szMsiPublishAssemblies[] = {'M','s','i','P','u','b','l','i','s','h','A','s','s','e','m','b','l','i','e','s',0};