Reputation: 4259
I have try to install jre through in my exe referred this link
Function installjre
SetOutPath '$TEMP'
SetOverwrite on
File lib\jre.exe
Exec $TEMP\jre.exe $0
FunctionEnd
I have used above and Its working very well.
problem:
c:\program files\java\jre
and i need to change this path to $INSTDir\jre
while running silent modeI have tried following command it seems to be does not work
Exec /silent $TEMP\jre.exe $0
How to solve above two problems?
Upvotes: 0
Views: 1361
Reputation: 11465
In the online documention for JRE Installer Options one can read:
<jre>.exe [/lang=] [/s] [IEXPLORER=1] [MOZILLA=1] [INSTALLDIR=:\] [STATIC=1]
in the details for the options:
/s, if used, indicates silent installation
and also
INSTALLDIR, if used, specifies the drive and path of the installation If INSTALLDIR is not specified, the installation will go into C:\Program Files\java\jre1.6.0 (default location).
Thus the correct invocation for the jre setup would be
ExecWait '"$TEMP\jre.exe" /s INSTALLDIR=$INSTDir\jre'
Notice the ExecWait
and quotes usage.
Refer this link Also from escaping quotes.
Upvotes: 2