Bur[N]er
6th November 2001 00:18 UTC
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
Bur[N]er
6th November 2001 01:03 UTC
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.
Lion King
6th November 2001 01:37 UTC
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
justin
6th November 2001 03:52 UTC
Use:
Exec '"$INSTDIR\whatever.exe"'
the outer quotes (') set the token, and " actually gets put in the string.
-Justin
Lion King
6th November 2001 04:12 UTC
i should have looked through all example scripts :D
Bur[N]er
6th November 2001 06:47 UTC
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.
Lion King
6th November 2001 08:02 UTC
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
Bur[N]er
6th November 2001 08:52 UTC
tired and stupid
Ok, sorry lionking, i'm an idiot :o
I didn't see the lil ' things there... thanks for the help