PDA

View Full Version : Launch Program after Install


Adam_x86
19th October 2005, 20:49
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.

l_d_allan
19th October 2005, 23:27
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)

Adam_x86
19th October 2005, 23:36
I'm looking for something like this (except the 'Readme' is 'Launch Program'):
http://img401.imageshack.us/img401/5121/screen4uo.gif (http://imageshack.us)

iceman_k
20th October 2005, 00:36
Read the MUI documentation.
It's part of your NSIS help docs.

mscoville
20th October 2005, 12:03
!define MUI_FINISHPAGE_RUN "program.exe"