Skip to content
⌘ NSIS Forum Archive

Extern Files in nsis exe

5 posts

danilodf#

Extern Files in nsis exe

I am new in nsis. I made an installer but I can´t put the files in the same file of the installer. It is just coping from a place to another. Can you help me?
danilodf#
I found the problem insnt in the "File" command but in the "ExecWait". I need to install the jre. Can I exec it from the installer without copying to the local machine? Or I´ll have to copy it to a temp dir, execute it and delete?
saivert#
tell user

If you want to bundle the Java Runtime installer with your NSIS installer, you need to included it in the installer using the file command. Just use this piece of shit:

InitPluginsDir ; This initalizes a temp dir
; Now copy Java Runtime installer to tempdir
File "/oname=$PLUGINSDIR\jresetup.exe" "path to setup on the compiling pc.exe"
ExecWait "$PLUGINSDIR\jresetup.exe"
When your installer quits, the folder in the $PLUGINSDIR variable will be removed including all files it contains.

It will probably be better to just check if the JRE is installed and then prompt the user to install it if it isn't installed. The ensures the user gets the latest version of the JRE.
Comm@nder21#
Or I´ll have to copy it to a temp dir, execute it and delete?
exactly.
like saivert posted already.