Read Registry not working on x64 Vista

Got a problem you cannot solve? Try here.
Post Reply
zims
Posts: 39
Joined: Mon Nov 24, 2008 11:41 am

Read Registry not working on x64 Vista

Post by zims »

Hi,

I am running the Trial version of InstallAware and are trying to migreate from InstallShield to InstallAware. So far everything looks very good except for one thing that I don't understand.


I am currently adding support to Install Microsoft SQL Server Native Client. My problem occures when I am trying to check is the Native Client is already installed or not.

To check this I read the registry key "SOFTWARE\\Microsoft\\Microsoft SQL Native Client\\CurrentVersion" and Value "Version". To read the registry I use the script "Read Registry".

On x86 OS i will get the Version number while calling Read Registry, but when running on x64 OS the value returned by Read Registry is empty. The strange part is that if I run my setup in Debug on a x64 computer Read Registry returns the value correct.

Another strange behavior is that if I use the script metod "Check Registry" instead of "Read Registry" it works on both x86 and x64, in both runtime and debug.

I guess I will be using Check Registry but I am the kind of person that "needs" to understand why something happends :)

Anyone that can tell my why I have this problem?
Tinus
Posts: 209
Joined: Tue Jun 20, 2006 8:42 am
Location: Germany

Post by Tinus »

Running 32 bit code on a x64 machine is done by WOW64 (Windows32 on Windows64). The registry is mapped to HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node.

Open regedit.exe on x64 and you will see the key HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node.

Open regedt32 and you only see the mapped version.
Martin Rothschink

AxoNet Software GmbH
http://www.axonet.de/products/other-pro ... stallaware
zims
Posts: 39
Joined: Mon Nov 24, 2008 11:41 am

Post by zims »

Thanks for answer Tinus but I am aware the "Wow6432Node" node and how it works.

My question are how can I get diffrent result when reading the same key and value with "Read Registry" and "Check Registry". For me Check Registry works on both x64 and x86, but Read Registry only works on x86?

Zims
Tinus
Posts: 209
Joined: Tue Jun 20, 2006 8:42 am
Location: Germany

Post by Tinus »

I can't comment on the differences between Read and Check registry (don't know the internals).

There's one more issue: Have you put your setup into x64 mode on x64? Without doing this you run in WOW on x64.
You may also want to check out the help description of "Set 64 Bit Mode".
Martin Rothschink

AxoNet Software GmbH
http://www.axonet.de/products/other-pro ... stallaware
zims
Posts: 39
Joined: Mon Nov 24, 2008 11:41 am

Post by zims »

I have not used the Set 64 Bit Mode since I want to read the 32-bit part of the registry.

Anyway, this is not a problem for me since everything works fine when I use Check registry. I was just interested to know if there was a logical reason why Read Registry and Check Registry gives me different results.

Except for this problem that gave me a headache for a few hours I am very impressed with Install Aware compared to Install Shield.
Post Reply