cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
laurakay
Level 2

32 bit installer on 64 bit Windows: 64 bit registry values not returned

We have a 32 bit installer that must be able to run on both 32 bit and 64 bit machines. I need to know how to get an accurate list of Windows Registry values when running a 32 bit installer on a 64 bit machine.

When our installer runs, it must check the Windows registry to determine whether several prerequisite applications are installed on the machine before the user can continue with their install of our application.

When I use the ISMP 11.5 Windows APIs to query the Windows Registry keys, I get different results when I run the 32 bit installer on a 32 bit machine than when I run the 32 bit installer on a 64 bit machine. "Different results" as in no keys found (when the keys actually do exist in the Windows registry) on the 64 bit machine, or SOFTWARE\Wow6432Node keys are returned on the 64 bit machine instead of the list of SOFTWARE keys.

Here is what I did to verify that the ISMP Windows Registry APIs are returning unexpected values on the 64 bit machine. I viewed the registry via regedit on both a 32 bit machine and on a 64 bit machine. I verified that the following keys existed and had subkeys under the Registry 'hives' on both machines:

Windows Registry 'hive': HKEY_CLASSES_ROOT
Key: Installer

Windows Registry 'hive': HKEY_CLASSES_ROOT
Key: Installer\Products

Windows Registry 'hive': HKEY_CURRENT_CONFIG
Key: System

Windows Registry 'hive': HKEY_CURRENT_USER
Key: Control Panel

Windows Registry 'hive': HKEY_LOCAL_MACHINE
Key: SOFTWARE

Windows Registry 'hive': HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft

Windows Registry 'hive': HKEY_USERS
Key: .DEFAULT

I used ISMP 11.5 Windows Registry APIs to get values from the Windows Registry. I am using ISMP 11.5 Premier and the following class and methods to get the list of registry keys in my custom bean:
a) Class: Win32RegistryService
b) Methods: keyExists, countSubKeys, getSubkeyNames

I get "key found" results (as expected) on my 32 bit machine for all the Windows Registry 'hives'. When I compare the 'key found' results in my log file with the information in the Windows Registry (as viewed in regedit), the list of keys are the same.

When I run the same 32 bit installer on the 64 bit machine, however, it does not return ANY "keys found" at all for the HKEY_CLASSES_ROOT and for the HKEY_LOCAL_MACHINE hive, it returns only the information under the SOFTWARE\Wow6432Node key, rather than the list of keys under the SOFTWARE key. When I compare the key found results in my log file with the information in the 64 bit Windows Registry, the list of keys returned by ISMP are NOT the same as the list of keys shown in the Windows Registry (as viewed in regedit).

Is there another way to get 64 bit Windows Registry values using a custom bean? Should I be using the existing API in a different way?
Labels (1)
0 Kudos
(2) Replies
QiZhang
Level 2

In fact, I met this problem also. Is there anyone know how to handle that?
0 Kudos
morrischou
Level 3

try to set
REGDB_OPTIONS = REGDB_OPTIONS | REGDB_OPTION_WOW64_64KEY
in OnBegin() function
Good luck 🙂
0 Kudos