cchian
22nd April 2004 23:08 UTC
ExecWait question
In the root of the CD I have the following files:
autorun.inf
launcher.exe
setup.exe
In my launcher.exe NSIS code I have the following lines:
Section ""
ExecWait setup.exe
SectionEnd
Is it better to use "ExecWait $EXEDIR\setup.exe" or does it makes no difference?
Is it necessary to set the path to the CD?
flizebogen
23rd April 2004 07:49 UTC
It's an important difference.
If no path is specified the content of the variable $OUTDIR is used as working directory. If you didn't set it using SetOutPath it can end up in any place.
It's very clever to use the Variable $EXEDIR as it is detected at runtime. You don't have to bother which drive / path is the current.
cchian
23rd April 2004 16:18 UTC
How is this code? Is SetOutPath needed?
Section ""
SetOutPath $EXEDIR
ExecWait $EXEDIR\setup.exe
SectionEnd
kichik
23rd April 2004 16:33 UTC
Don't forget to quote, just in case:
ExecWait '"$EXEDIR\setup.exe"'