- NSIS Discussion
- Install a JRE with the NSIS installer
Archive: Install a JRE with the NSIS installer
Leonard S
23rd May 2003 13:33 UTC
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 :)
Sunjammer
23rd May 2003 13:58 UTC
Something like :-
File /oname="$TEMP/jre_setup.exe" jre_setup_exe_filename.exe
ExecWait "$TEMP/jre_setup.exe"
kichik
23rd May 2003 14:50 UTC
If ExecWait doesn't wait see:
http://forums.winamp.com/showthread....ghlight=%2FSMS
Leonard S
23rd May 2003 15:11 UTC
Ok, thanks!
I'll try it
Leonard S
23rd May 2003 17:52 UTC
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)
kichik
23rd May 2003 23:57 UTC
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.
Leonard S
24th May 2003 00:14 UTC
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?
kichik
24th May 2003 00:16 UTC
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 :)).
Leonard S
24th May 2003 00:44 UTC
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".
kichik
24th May 2003 10:46 UTC
Use (without the quotes in /oname):
File /oname=$TEMP\jre_setup.exe jre_setup_exe_filename.exe
ExecWait "$TEMP\jre_setup.exe"
Sunjammer
24th May 2003 13:24 UTC
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.
Leonard S
24th May 2003 14:53 UTC
Thanks very much dudes.
Now it works :)
Another Question:
Jext has many files, must i include them all with the "File" command?
Sunjammer
24th May 2003 15:29 UTC
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
Leonard S
24th May 2003 15:45 UTC
Very Quick answer! Thanks!