cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
atulmaurya
Level 6

Accessing Registry entries of 32-bit application in Windows Server 2008 R2

Hi,

Sorry if the post is not relevant to the forum topics.

I am crating an installer for Windows Server 2008 R2 platform. My installer installs JRE with it and for this it detects whether a compatble version of JRE is installed or not on the target machine.

Currently we are doing this through registry check. The problem is that during registry update all the entries are automatically updated under WoW64 (while i am using HKLM\Software\JavaSoft and WoW64 folder is not included in path) folder for example the entries of Java are automatically updated in "HKLM\WoW64\Software\JavaSoft" (may be because of registry redirector) but when i try to read the key using "HKLM\Software\JavaSoft" it shows the error "Key not found".

Since, we are only moving from Windows Server 2003 to Windows Server 2008 R2, all the scripts were developed for Win 2k3 Server. So, do I need to modify all the scripts and include WoW64 in the path while accessing the registry or is there any other way which can resolve my problem.

Thanks alot for your valuable time.
Labels (1)
0 Kudos
(4) Replies
hari14singh
Level 5

use REGDB_OPTIONS = REGDB_OPTIONS + REGDB_OPTIONS_WOW64_64KEY

Dont forget to make it REGDB_OPTIONS = REGDB_OPTIONS & ~REGDB_OPTIONS_WOW64_64KEY after use
0 Kudos
atulmaurya
Level 6

Hi hari,

Where to use this code. In my project we have created many registry files and during installation we update them using "reg" command.

Also we access the registry using "reg" command. for example REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.6" /v "JavaHome".

So where should I use the code suggested by you.

Thanks for your reply.
0 Kudos
hari14singh
Level 5

the above code is for installscript.
In which language you are writing your custom actions?
0 Kudos
atulmaurya
Level 6

Hello Hari,

I am writing my custom code in Java. Should I write an action that includes your code and execute it before updating/retrieving any registry entries?

Thanks alot
Atul
0 Kudos