msi: Register class ids from 32-bit packages under Wow6432Node on 64-bit.

This commit is contained in:
Hans Leidekker 2010-10-13 14:23:25 +02:00 committed by Alexandre Julliard
parent e8723a5dee
commit 43a680a155
4 changed files with 19 additions and 5 deletions

View File

@ -804,12 +804,19 @@ static UINT register_appid(const MSIAPPID *appid, LPCWSTR app )
UINT ACTION_RegisterClassInfo(MSIPACKAGE *package) UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
{ {
static const WCHAR szFileType_fmt[] = {'F','i','l','e','T','y','p','e','\\','%','s','\\','%','i',0}; static const WCHAR szFileType_fmt[] = {'F','i','l','e','T','y','p','e','\\','%','s','\\','%','i',0};
const WCHAR *keypath;
MSIRECORD *uirow; MSIRECORD *uirow;
HKEY hkey,hkey2,hkey3; HKEY hkey,hkey2,hkey3;
MSICLASS *cls; MSICLASS *cls;
load_classes_and_such(package); load_classes_and_such(package);
if (RegCreateKeyW(HKEY_CLASSES_ROOT, szCLSID, &hkey) != ERROR_SUCCESS)
if (is_64bit && package->platform == PLATFORM_INTEL)
keypath = szWow6432NodeCLSID;
else
keypath = szCLSID;
if (RegCreateKeyW(HKEY_CLASSES_ROOT, keypath, &hkey) != ERROR_SUCCESS)
return ERROR_FUNCTION_FAILED; return ERROR_FUNCTION_FAILED;
LIST_FOR_EACH_ENTRY( cls, &package->classes, MSICLASS, entry ) LIST_FOR_EACH_ENTRY( cls, &package->classes, MSICLASS, entry )
@ -963,12 +970,19 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package ) UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package )
{ {
static const WCHAR szFileType[] = {'F','i','l','e','T','y','p','e','\\',0}; static const WCHAR szFileType[] = {'F','i','l','e','T','y','p','e','\\',0};
const WCHAR *keypath;
MSIRECORD *uirow; MSIRECORD *uirow;
MSICLASS *cls; MSICLASS *cls;
HKEY hkey, hkey2; HKEY hkey, hkey2;
load_classes_and_such( package ); load_classes_and_such( package );
if (RegOpenKeyW( HKEY_CLASSES_ROOT, szCLSID, &hkey ) != ERROR_SUCCESS)
if (is_64bit && package->platform == PLATFORM_INTEL)
keypath = szWow6432NodeCLSID;
else
keypath = szCLSID;
if (RegOpenKeyW( HKEY_CLASSES_ROOT, keypath, &hkey ) != ERROR_SUCCESS)
return ERROR_SUCCESS; return ERROR_SUCCESS;
LIST_FOR_EACH_ENTRY( cls, &package->classes, MSICLASS, entry ) LIST_FOR_EACH_ENTRY( cls, &package->classes, MSICLASS, entry )

View File

@ -37,6 +37,8 @@
#include "wine/list.h" #include "wine/list.h"
#include "wine/debug.h" #include "wine/debug.h"
static const BOOL is_64bit = sizeof(void *) > sizeof(int);
#define MSI_DATASIZEMASK 0x00ff #define MSI_DATASIZEMASK 0x00ff
#define MSITYPE_VALID 0x0100 #define MSITYPE_VALID 0x0100
#define MSITYPE_LOCALIZABLE 0x200 #define MSITYPE_LOCALIZABLE 0x200
@ -1147,6 +1149,7 @@ static const WCHAR szAdminUser[] = {'A','d','m','i','n','U','s','e','r',0};
static const WCHAR szIntel[] = {'I','n','t','e','l',0}; static const WCHAR szIntel[] = {'I','n','t','e','l',0};
static const WCHAR szIntel64[] = {'I','n','t','e','l','6','4',0}; static const WCHAR szIntel64[] = {'I','n','t','e','l','6','4',0};
static const WCHAR szX64[] = {'x','6','4',0}; static const WCHAR szX64[] = {'x','6','4',0};
static const WCHAR szWow6432NodeCLSID[] = {'W','o','w','6','4','3','2','N','o','d','e','\\','C','L','S','I','D',0};
/* memory allocation macro functions */ /* memory allocation macro functions */
static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1); static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1);

View File

@ -1350,7 +1350,6 @@ static UINT msi_parse_summary( MSISUMMARYINFO *si, MSIPACKAGE *package )
static UINT validate_package( MSIPACKAGE *package ) static UINT validate_package( MSIPACKAGE *package )
{ {
static const BOOL is_64bit = sizeof(void *) > sizeof(int);
BOOL is_wow64; BOOL is_wow64;
UINT i; UINT i;

View File

@ -40,8 +40,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(msi); WINE_DEFAULT_DEBUG_CHANNEL(msi);
static const BOOL is_64bit = sizeof(void *) > sizeof(int);
/* /*
* This module will be all the helper functions for registry access by the * This module will be all the helper functions for registry access by the
* installer bits. * installer bits.