thecoolnessrune
28th September 2005 01:57 UTC
Running other .exe's during installation
Hi all. I'm new here and a beginner to NSIS. I have been using niseditor to make installers. I wanted to know if anyone could post an example script that I could use to run an exe put in with the NSIS installer during installations. For instance:
Begin installation:
Install standard stuff
When finished execute specific installer
When finished with that one install another
Then complete the installation
All while being able to have the user choose which exe(s) he wants to install.
Can anyone help with this???
Jamyn
28th September 2005 07:50 UTC
Section InstallSomething SEC0000
ClearErrors
DetailPrint "Running something cool."
ExecWait "C:\Program Files\Windows NT\Accessories\wordpad.exe"
IfErrors stop
DetailPrint "Running something else cool."
ExecWait "c:\windows\system32\notepad.exe"
IfErrors stop
goto done
stop:
DetailPrint "Installation failed."
Sleep 5000 ; Delay 5 seconds so they can read it.
Abort
done:
>SectionEnd
>
If you want the section "hidden" from the list of choices the user can make, put a "-" in front of the section name. Like:
Section -InstallSomething SEC0000
You can use "Exec" instead of "ExecWait" if you don't want the installer to wait for whatever it is to finish running. Sounds like you want to use ExecWait. PS: I think you can use %SYSTEMROOT% (c:\windows\) and %PROGRAMFILES% (c:\program files\) inside NSIS installers.
thecoolnessrune
28th September 2005 23:34 UTC
Wow man thx alot!