I have a Windows Server 2008 machine (64bit) and I'm trying to grab a value from the registry with a 32bit NSIS installer binary but I get re-directed to Wow64node even with SetRegView 64 set.
I'm using the following code to check the JRE version and grab java_home:
${elseif} $arch == "64"
;check for 64bit JRE on 64bit
SetRegView 64
ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
Messagebox MB_OK "1: $1"
ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$1" "JavaHome"
;check for 32bit JRE on 64bit
${if} $2 == ""
ReadRegStr $1 HKLM "SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment" "CurrentVersion"
ReadRegStr $2 HKLM "SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment\$1" "JavaHome"
${endif}
${endif} The MessageBox always prints $1 as nothing even though the registry key exists.Any help would be appreciated.