Archive: ExecWait question


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?

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.


How is this code? Is SetOutPath needed?


Section ""
SetOutPath $EXEDIR
ExecWait $EXEDIR\setup.exe
SectionEnd

Don't forget to quote, just in case:

ExecWait '"$EXEDIR\setup.exe"'