Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 6th June 2013, 10:21   #1
ilaiyaraja
Member
 
Join Date: Sep 2012
Posts: 81
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 is offline   Reply With Quote
Old 6th June 2013, 11:35   #2
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
1a:
http://nsis.sourceforge.net/ExecCmd_plug-in

1b:
http://docs.oracle.com/javase/7/docs...r-options.html

2:
http://docs.oracle.com/javase/7/docs...r-options.html
jpderuiter is offline   Reply With Quote
Old 7th June 2013, 04:40   #3
ilaiyaraja
Member
 
Join Date: Sep 2012
Posts: 81
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 is offline   Reply With Quote
Old 7th June 2013, 06:57   #4
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
http://stackoverflow.com/questions/1...ry-with-spaces
jpderuiter is offline   Reply With Quote
Old 7th June 2013, 09:03   #5
ilaiyaraja
Member
 
Join Date: Sep 2012
Posts: 81
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?
ilaiyaraja is offline   Reply With Quote
Old 7th June 2013, 10:51   #6
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
Why do you use /qn option?
It's not supported.
Also you have to escape 2 double quotes.
Use
code:
ExecWait '"$TEMP\jre.exe" /s INSTALLDIR=\"$INSTDIR\jre.exe\"'
instead.
jpderuiter is offline   Reply With Quote
Old 7th June 2013, 10:54   #7
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
OK, you probably don't need to escape the double quotes, but you still have to use them.
So also try
code:
ExecWait '"$TEMP\jre.exe" /s INSTALLDIR="$INSTDIR\jre.exe"'
jpderuiter is offline   Reply With Quote
Old 10th June 2013, 07:12   #8
ilaiyaraja
Member
 
Join Date: Sep 2012
Posts: 81
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\" " '
ilaiyaraja is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
java, nsis

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump