ilaiyaraja
6th June 2013 11:21 UTC
How to install jre with background process while instaling through NSIS?
I have try to install jre through in my exe with the following code:
Function installjre
SetOutPath '$TEMP'
SetOverwrite on
File lib\jre.exe
Exec $TEMP\jre.exe $0
FunctionEnd
Its working very well.
problem:
1.How to Install jre in background process.Is possible to install jre as silent mode.
2.by default jre will take c:\program files\java\jre and i need to change this path to $INSTDir\jre while running silent mode
I have tried following command it seems to be does not work
Exec /silent $TEMP\jre.exe $0
How to solve above two problems?
ilaiyaraja
7th June 2013 05:40 UTC
Thanks jp.I have tired JRE online document.but it seems to be not working well.
I have tried this command
ExecWait '"$TEMP\jre.exe" /s INSTALLDIR=$INSTDir\jre'
ilaiyaraja
7th June 2013 10:03 UTC
once again thanks Jp.its very useful link for me.After referred given URL i have tried following command:
ExecWait '$TEMP\jre.exe /s /v"/qn INSTALLDIR=\"$INSTDIR\jre.exe" "'
This time jre installation is not happening.Its goes next step.
Jre installation is not possible in silent mode using NSIS?
jpderuiter
7th June 2013 11:51 UTC
Why do you use /qn option?
It's not supported.
Also you have to escape 2 double quotes.
Use
ExecWait '"$TEMP\jre.exe" /s INSTALLDIR=\"$INSTDIR\jre.exe\"'
instead.
jpderuiter
7th June 2013 11:54 UTC
OK, you probably don't need to escape the double quotes, but you still have to use them.
So also try
ExecWait '"$TEMP\jre.exe" /s INSTALLDIR="$INSTDIR\jre.exe"'
ilaiyaraja
10th June 2013 08:12 UTC
Thanks,Finally its worked Using following command for your above reference
http://stackoverflow.com/questions/1...ry-with-spaces
'$TEMP\jre.exe /s /v"/qn INSTALLDIR=\"$INSTDIR\jre6\" " '