6741 shaares
14 results
tagged
nsis
IfErrors DownloadJRE JreFound DownloadJRE: Call ElevateToAdmin MessageBox MB_ICONINFORMATION "${PRODUCT_NAME} uses Java Runtime Environment ${JRE_VERSION}, it will now be downloaded and installed." StrCpy $2 "$TEMP\Java Runtime Environment.exe" nsisdl::download /TIMEOUT=30000 ${JRE_URL} $2 Pop $R0 ;Get the return value StrCmp $R0 "success" +3 MessageBox MB_ICONSTOP "Download failed: $R0" Abort ExecWait $2 Delete $2 ReadRegStr $R1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion" ReadRegStr $R0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$R1" "JavaHome" StrCpy $R0 "$R0\bin\${JAVAEXE}" IfFileExists $R0 0 GoodLuck Call CheckJREVersion IfErrors GoodLuck JreFound ; 4) wishing you good luck GoodLuck: StrCpy $R0 "${JAVAEXE}" ; MessageBox MB_ICONSTOP "Cannot find appropriate Java Runtime Environment." ; Abort
RequestExecutionLevel user