Archive: Launch Program after Install


Launch Program after Install
How do I make a tickbox option that asks the user to launch the main program after installtion?

Could someone show me where to look in the docs or the code I need? I'm a real newbie but I get the hang of it fast. Thanks.


Not sure I understand your question, but ...

There is the 'placeholder' function
.onInstSuccess
that is always called at the end of a successful installation. I've used something like:


Function .onInstSuccess
ExecWait '"$INSTDIR\MyApp parameters"'
# may prefer Exec instead of ExecWait
FunctionEnd

You could also have

Page Components
;;; more statements

Section /o "Run MyApp"
ExecWait '"$INSTDIR\MyApp parameters"'
# may prefer Exec instead of ExecWait
SectionEnd


if you want to have MyApp run 'midway' thru the application rather than at the end. (The first option above sounds closer to what you are asking. I suppose you could use StrCpy to set some kind of myAppRunFlag variable and then check that during .onInstSuccess so that it would run as the last thing)

I'm looking for something like this (except the 'Readme' is 'Launch Program'):
http://img401.imageshack.us/img401/5121/screen4uo.gif


Read the MUI documentation.
It's part of your NSIS help docs.


!define MUI_FINISHPAGE_RUN "program.exe"