3 ; Definitions for Java Detection
5 !define JRE_VERSION "1.6"
6 !define JRE32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=52247&/jre-6u27-windows-i586.exe"
7 !define JRE64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=52249&/jre-6u27-windows-x64.exe"
14 StrCpy $JavaDownload ${JRE64_URL}
17 StrCpy $JavaDownload ${JRE32_URL}
21 MessageBox MB_OK "This product uses Java ${JRE_VERSION}, \
22 $JavaBits bits, it will now \
23 be downloaded and installed"
25 StrCpy $2 "$TEMP\Java Runtime Environment.exe"
26 nsisdl::download /TIMEOUT=30000 $JavaDownload $2
27 Pop $R0 ;Get the return value
28 StrCmp $R0 "success" +3
29 MessageBox MB_OK "Download failed: $R0"
36 ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \
39 DetailPrint "Desired Java version ${JRE_VERSION}"
40 DetailPrint "Actual Java version $2"
42 ${VersionCompare} $2 ${JRE_VERSION} $3