Archive: Launch my program if /s is used


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:
Do you know how I can do that?

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?

You can use IfSilent to check whether the installer is silent. Exec should work fine, make sure the files are correctly installed.