Archive: Launching an .exe after install?


Launching an .exe after install?
Ok guys, I need to launch an .exe file that has a seperate configuration for my app and I tried:

Function .onInstSuccess
MessageBox MB_YESNO "Congrats, it worked. Set Up Evars?" IDNO NoEvar
Exec "$INSTDIR\EvarSetup.exe"
NoEvar:
FunctionEnd
The message box pops up, but it doesn't launch the app? Is there something else I have to do since this .exe just got installed? Or should I move that function to the end of my .nsi? I'm sure that doesn't matter cause it's called after installation, but I'm lost? Any help would be greatly appreciated, thanks!
-Bur[N]er


further debugging
Well, that little function only works if my $INSTDIR has no spaces. Hence, it won't let me install to C:\Program files\ and then run an app from there. I have quotes around it so I figured that would work, but alas, it does not.


Function .onInstSuccess
MessageBox MB_YESNO|MB_ICONQUESTION \
"Setup has completed. View readme file now?" \
IDNO NoReadme
ExecShell open '$INSTDIR\makensis.htm'
NoReadme:
FunctionEnd
from makensis.nsi example
looks like you used the wrong quotes

Use:

Exec '"$INSTDIR\whatever.exe"'

the outer quotes (') set the token, and " actually gets put in the string.

-Justin


i should have looked through all example scripts :D


even more lost...
Justin... seems to me that I did put
Exec "$INSTDIR\whatever.exe"
except my case is:
Exec "$INSTDIR\EvarSetup.exe"
I don't see a difference?

It's not a real big issue as my installer doesn't default to a folder with spaces, but I would like it to work if people change that.


o.k. this time with spaces: ' " $ I N S T D I R / E v a r S e t u p . e x e " '

btw. ExecShell open '$INSTDIR\makensis.exe' worked for me, makensis.exe was in c:\program files\nsis, but justin showed you the recommended way


tired and stupid
Ok, sorry lionking, i'm an idiot :o
I didn't see the lil ' things there... thanks for the help