Skip to content
⌘ NSIS Forum Archive

Problems installing JRE - ExecWait

3 posts

thegrinch#

Problems installing JRE - ExecWait

Hi!
I want my Installer to install Suns JRE silently.
OK. Suns remarks on silent installation can be found here.

See my script:

InstallJRE:
DetailPrint "Launching JRE setup"
File /oname=$TEMP\jre_setup.exe j2re-setup.exe
;ExecWait "$TEMP\jre_setup.exe" $0
SetOutPath $TEMP
ExecWait '"$TEMP\jre_setup.exe /s /v$\"/qn ADDLOCAL=ALL REBOOT=Suppress /L C:\setup.log$\""' $0

DetailPrint "Java Setup finished with $0"
Delete "$TEMP\jre_setup.exe"
StrCmp $0 "0" InstallVerif 0
Push "Das Java Runtime Environment Setup wurde unerwartet abgebrochen!"
Goto ExitInstallJRE
The problem is, that as soon as jre_setup.exe... is called, it immediately exits with $0 = NOK.
I read at least 10 Threads about ExecWait not doing what it should, please help me!

BIT THANKS TO ALL OF YOU IN ADVANCE!!!
thegrinch#
OK.
after changing my script as follows:

InstallJRE:
DetailPrint "Launching JRE setup"
File /oname=$TEMP\jre_setup.exe j2re-setup.exe
;ExecWait "$TEMP\jre_setup.exe" $0
SetOutPath $TEMP
ExecWait '"$TEMP\jre_setup.exe" /s /v$\"/qn ADDLOCAL=ALL REBOOT=Suppress /L C:\setup.log$\"' $0

;DetailPrint "Java Setup finished with $0"
;Delete "$TEMP\jre_setup.exe"
StrCmp $0 "1" InstallVerif 0
Push "Das Java Runtime Environment Setup wurde unerwartet abgebrochen!"
DetailPrint "Java Setup finished with $0"
Goto ExitInstallJRE
Now java installs. Ok. BUT:
$0 is still NOK!!!
I looked inside setup.log, which says, erverything worked fine and java will me ready to run after reboot.
How can I catch that problem?