Problems with 64-bit installation

Got a problem you cannot solve? Try here.
Post Reply
AndreasS
Posts: 3
Joined: Fri Dec 08, 2006 4:29 pm

Problems with 64-bit installation

Post by AndreasS »

I'm creating a mixed 32/64-bit installation. In the beginning of the script I detect whether the installation is running on a 64-bit OS, and initialize the 64-bit mode accordingly.

When running in 64-bit mode, the installer needs to register both 32- and 64-bit COM classes, so I am writing registry values to both HKLM\\SOFTWARE\\Classes\\CLSID and HKLM\\SOFTWARE\\Wow6432Node\\Classes\\CLSID. The problem is that no registry data is written to the Wow6432Node.

I have debugged the script, and the Write Registry Key commands to Wow6432Node are executed, but when I investigate using regedit after the installation, no values exists.

Below is an excerpt of the installer script:

Code: Select all

Write Registry Key HKLM\\SOFTWARE\\Wow6432Node\\Classes\\CLSID\\{E82491FC-2234-4FFC-BC73-D05B27FF3B0F}\\InprocServer32\\ThreadingModel, Both

Write Registry Key HKLM\\SOFTWARE\\Wow6432Node\\Classes\\CLSID\\{E82491FC-2234-4FFC-BC73-D05B27FF3B0F}\\InprocServer32\\, <PathToDll>
And here is the corresponding log entries from the installation log:

Code: Select all

MSI (s) (8C:B0) [07:25:09:774]: Executing op: RegOpenKey(Root=-2147483646,Key=SOFTWARE\\Wow6432Node\\Classes\\CLSID\\{E82491FC-2234-4FFC-BC73-D05B27FF3B0F}\\InprocServer32,,BinaryType=1,)

MSI (s) (8C:B0) [07:25:09:774]: Executing op: RegAddValue(Name=ThreadingModel,Value=Both,)

MSI (s) (8C:B0) [07:25:09:776]: Executing op: RegAddValue(,Value=<PathToDll>,)
Is this a problem you have heard of before. Am I doing something wrong? I have tested this with Windows Server 2003 R2 64-bit edition under VMWare, and a standard installation of Vista 64-bit Ultimate (no VMWare).

Another issue I have encountered is a problem with retrieving the 64-bit architecture. In your documentation you suggest the the PROCESSOR_ARCHITECTURE environment variable should be used to find out the processor architecture. When I try this I always get X86 (not AMD64). I believe that this is expected since the install script is running as a 32-bit process. I have not tested on an IA64 processor, but I assume that the architecture will be reported as X86 on IA64 as well. Is that correct? If it is, do yo have any other suggestion on how to detect the architecture?

/Andreas
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Hey Andreas,

Good observation on the environment variable, this does seem to be pre-set to x86. I think IA might need a command extension to specifically return the platform architecture.

About your other issue...might be Windows Installer protecting that particular node of the registry in 64 bit mode. I sure haven't heard of that before, will try to find out more when I get a chance. I know in 64 bit mode you can freely write to any file locations, for instance, so a bit puzzled by this.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
mannaggia
Posts: 9
Joined: Sun Dec 10, 2006 9:02 pm

Post by mannaggia »

According to a Microsoft driver installation document, the platform can be detected from a 32-bit installer by:

· Call IsWow64Process with a handle to your process and a pointer to a Boolean value. If the process is running under WOW64, IsWow64Process sets the Boolean value to TRUE; otherwise, it sets the Boolean value to FALSE.

· Check the value returned by UpdateDriverForPlugAndPlayDevices. If the return value is ERROR_IN_WOW64, the 32-bit application is executing on a 64-bit platform.

· Call GetSystemWow64Directory. If GetSystemWow64Directory fails and GetLastError returns ERROR_CALL_NOT_IMPLEMENTED, the installer is running on 32-bit Windows.
See http://www.microsoft.com/whdc/driver/in ... stall.mspx
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

IA already detects the platform - but doesn't provide a pre-built mechanism to detect the architecture, which can be Intel or AMD for x64 (more clearly, the possibilities are Intel Itanium, or Intel EM64T which is compatible with AMD64).
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Post Reply