How can i have the installer launch my program when the installation is finished? Is it also possible to launch other programs when the install finishes (and how)?
Archive: Launching program from installer
How can i have the installer launch my program when the installation is finished? Is it also possible to launch other programs when the install finishes (and how)?
EXEC DRIVE:\PATH\PROGRAM.EXE
Can you please tell me how to exec a program off of the cd? i tried lookin in the forums, but time does not allow me to do a thorough search.
Thanx
:)
Try this. Use the adaptive HTML Launcher to run a program off of the CD.
Name "EXE DIR Launcher"
OutFile autorun.exe
SilentInstall silent
Icon CD.ico
Section ""
ExecShell open "$EXEDIR\myprogram.exe"
SectionEnd
Name "EXE DIR Launcher"
OutFile autorun.exe
SilentInstall silent
Icon CD.ico
Section ""
ExecShell open "$EXEDIR\index.html"
SectionEnd
Name "EXE DIR Launcher"
OutFile autorun.exe
SilentInstall silent
Icon CD.ico
Section ""
ExecShell open "$EXEDIR"
SectionEnd
News
As per version 1.44 of NSIS you should use the .onInstSuccess function to execute programs ans so on at the end of install. This assures that the instruction only get executed when the installation is successfull. Check this sample NSI script:
Name ".OnInstSuccess Sample"
OutFile oninstsuccess_sample.exe
InstallDir "$PROGRAMFILESDIR\onInstSuccess Sample\"
Section
CreateDirectory $INSTDIR
SectionEnd
Function .onInstSuccess
Exec $INSTDIR
FunctionEnd
; Function .onInstSuccess gets called automatically at install success.