Permalink
Browse files

FLUME-646: Add support to the FlumeNode windows installer to detect 3…

…2-bit Java Installations (read JAVA_HOME properly) when running on 64 bit windows machines.
  • Loading branch information...
1 parent b1b58ec commit 9b3caa4d8536d74d33f34fc5a83180d331ca4274 Satish committed with jmhsieh May 27, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/nsis/flume.nsi.template
@@ -38,6 +38,7 @@
!include "StrFunc.nsh"
!include "LogicLib.nsh"
!include "FileFunc.nsh"
+!include "x64.nsh"
${StrRep}
Var JavaHome
@@ -546,6 +547,15 @@ Function findJavaHome
ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$2" "RuntimeLib"
IfErrors 0 NoErrors
+
+ ${If} ${RunningX64}
+ ReadRegStr $2 HKLM "SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment" "CurrentVersion"
+ ReadRegStr $1 HKLM "SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment\$2" "JavaHome"
+ ReadRegStr $3 HKLM "SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment\$2" "RuntimeLib"
+ ${EndIf}
+
+ IfErrors 0 NoErrors
+
StrCpy $1 ""
NoErrors:

0 comments on commit 9b3caa4

Please sign in to comment.