Skip to content
⌘ NSIS Forum Archive

Not able to read registry values in windows 64 inside wow6432node

6 posts

Mohamaed#

Not able to read registry values in windows 64 inside wow6432node

I am trying to read a registry value present inside the Wow6432Node
But it is not giving the value in the message box after it
Anders#
And that is all the information you could provide? How about telling us which key you want to access, which version of NSIS and Windows you are using? Some example code?

You are not supposed to access the wow6432node key directly, it is a Windows implementation detail. You can use the SetRegView instruction to select which part of the registry you want to access but the 32-bit node is the default so it should work out of the box. Using Process Monitor from Microsoft is also useful in these situations...
Mohamaed#
I am using NSIS Version V2.46
the code i am using is
ReadRegDWORD $0 HKLM "SOFTWARE\Wow6432Node\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\National Instruments\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\National Instruments\NI-VISA for Windows 95/NT\CurrentVersion" Version
I am new to NSIS may I know how to find the value that gets stored in the variable $0
Anders#
That key makes no sense, please try posting your real code. Wow6432Node should not appear in the path nor should HKEY_*, it should look like ReadRegDword $0 HKLM "Software\MyCompany\MyApp" "Version" or something like that.

When using Regedit on a 64-bit version of Windows you will see some keys under the Wow6432Node key but because NSIS is a 32-bit application all reads and writes go there by default so you should not use Wow6432Node in your .nsi.
meoit#
Using SetRegView

SetRegView 32
ReadRegStr $0 HKLM Software\Microsoft\Windows\CurrentVersion ProgramFilesDir
DetailPrint $0 # prints C:\Program Files (x86)

SetRegView 64
ReadRegStr $0 HKLM Software\Microsoft\Windows\CurrentVersion ProgramFilesDir
DetailPrint $0 # prints C:\Program Files

😉