Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 19th August 2015, 13:40   #1
Mohamaed
Junior Member
 
Join Date: Aug 2015
Posts: 23
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
Mohamaed is offline   Reply With Quote
Old 19th August 2015, 14:01   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,296
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...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 19th August 2015, 14:24   #3
Mohamaed
Junior Member
 
Join Date: Aug 2015
Posts: 23
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
Mohamaed is offline   Reply With Quote
Old 19th August 2015, 14:51   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,296
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.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 25th August 2015, 05:07   #5
Mohamaed
Junior Member
 
Join Date: Aug 2015
Posts: 23
Thanks.

I got what I was looking for
Mohamaed is offline   Reply With Quote
Old 15th October 2015, 15:13   #6
meoit
Member
 
Join Date: Oct 2014
Location: $DESKTOP
Posts: 99
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

meoit is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
registry

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump