Archive: Install a JRE with the NSIS installer


Install a JRE with the NSIS installer
Hello,

i wanna write an installer for Jext.
This java-editor needs a JRE.
I must include the main components of Jext + the latest
JRE.

My Question:
Can NSIS launch the JRE Setup? So, the installer shouldn't only extract the *.exe, it should run the setup of the JRE.

Is this possible?
Thanks :)


Something like :-

File /oname="$TEMP/jre_setup.exe" jre_setup_exe_filename.exe
ExecWait "$TEMP/jre_setup.exe"

If ExecWait doesn't wait see:
http://forums.winamp.com/showthread....ghlight=%2FSMS


Ok, thanks!
I'll try it


After using the code of Sunjammer i was getting an error (screenshot).
It means, that there was an error while overwriting a file (?).

What means "jre_setup_exe_filename.exe"
Which Filename? :confused:

Ok, kichik, now i have a look at your link :)

btw:
With NSIS i can check if Flash-player is installed, right?
Can i also check if a JRE/JDK is installed?
If not, could i use a checkbox at the end of the installation?
Many installers are using checkboxes for "view the readme now" and so on, can i use a checkbox for installing the JRE?
So, if the user checks the box "install the JRE now", the installtion of the JRE starts. (In modern UI)


Try (notice the back slash instead of the forward slash):

File /oname="$TEMP\jre_setup.exe" jre_setup_exe_filename.exe
ExecWait "$TEMP\jre_setup.exe"


There have been some threads about detecting JRE. Search the forum and have a look at The Archive too.

Thanks, i've found one :D.

Yes, i know, i've changed the slash to a backslash, but i get still this error.

What about the checkbox method?


According to that screen shot you haven't changed both, namely the one in the /oname.

Joost or somebody else will have to answer the checkbox question because I can't quite remember right now (it's 2am here :)).


It doesn't work, and yes, i've changed both slashes.
It seems, that the Installer thinks the "JRE" is extracted to "$INSTDIR\$TEMP\jre_setup.exe", but it must be only "$TEMP\jre_setup".


Use (without the quotes in /oname):

File /oname=$TEMP\jre_setup.exe jre_setup_exe_filename.exe
ExecWait "$TEMP\jre_setup.exe"

Originally posted by Leonard S What means jre_setup_exe_filename.exe"
Which Filename? :confused:
The file name of the program you have to run to perform the JRE installation.

Thanks very much dudes.
Now it works :)
Another Question:
Jext has many files, must i include them all with the "File" command?


File /r will recursively add the contents of a directory and wildcards are also supported. See http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.1.5


Very Quick answer! Thanks!