fabiochelly
31st January 2004 08:17 UTC
Launch my program if /s is used
Hi,
I currently use those lines:
!define MUI_FINISHPAGE_RUN "$INSTDIR\${MAIN_EXE}"
!insertmacro MUI_PAGE_FINISH
to launch my program when the setup ends.
Now, I would like to:
- Automatically start my main exe at the end of the setup (no confirmation checkbox) if the setup is in silent mode (after a call with /S parameter)
- Never launch my main exe at the end of the setup if the setup is not in silent mode
Do you know how I can do that?
fabiochelly
31st January 2004 08:55 UTC
I just succeed to make it work with the following code:
Section -LaunchApp
Call GetParameters
Pop $0
StrCmp $0 "/S" IsSilent IsNotSilent
IsSilent:
Exec "$INSTDIR\${MAIN_EXE}"
IsNotSilent:
SectionEnd
But the exec function is not called in silent mode unless I add a MessageBox instruction juste before the Exec line.
How can I force the exec function to work in silent mode?
Joost Verburg
31st January 2004 13:26 UTC
You can use IfSilent to check whether the installer is silent. Exec should work fine, make sure the files are correctly installed.