Archive: ReadRegDWORD returns empty string on some keys on 64 bit Vistas.


ReadRegDWORD returns empty string on some keys on 64 bit Vistas.


ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\InetStp" "MajorVersion"
MessageBox MB_OK "CheckIISInstalled: $$0=$0"
ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\InetStp\Components" "ASPNET"
MessageBox MB_OK "Components: $$0=$0"

Running this code on both 32bit and 64bit Windows Vista. Both have 7 and 1 in such registers.

On 32 bit Vistas it shows 7 and 1. (Correct)
On 64 bit Vistas it shows 7 and "". (Not true)
Boths Vistas have UAC disabled and installer is run by local admin. And the "users" group has right to read both keys.
On Windows 2003 works fine too. When read such keys by .Net code, it also works okay.

Any ideas?

On Windows 64-bit you have two copies of HKLM\Software. One for 32-bit applications and one for 64-bit applications. You can access both from NSIS using SetRegView.


It works. Thank you kichik.
(BTW do not know why MS is giving IIS version to both branches and it's components only to 64 bit.)