Archive: ExecWait doesn't work on any NSIS installer


ExecWait doesn't work on any NSIS installer
On my computer, ExecWait doesn't bother executing the specified executable, returns nothing but sets the error flag.
This happens on all apps which use ExecWait (possibly Exec and ExecShell too).
Does anyone have any ideas?


The main idea is that ExecWait does not find a valid path/file name to execute.

Alternate there are command line parameters that need a correct quotation.

Possible other ideas too, could you post a minimal sample code?


Originally posted by Red Wine
The main idea is that ExecWait does not find a valid path/file name to execute.

Alternate there are command line parameters that need a correct quotation.

Possible other ideas too, could you post a minimal sample code?
I have verified in all instances that the file exists and is being called correctly.

The following code does not work:
OutFile "File.exe"
Section
ExecWait "$EXEDIR\Test.exe"
SectionEnd

You must quote the path.

ExecWait '"$EXEDIR\Test.exe"'

Originally posted by kichik
You must quote the path.
ExecWait '"$EXEDIR\Test.exe"'
Is this only a requirement as of a recent release, or has this always been the case?
I assume it is only in recent versions, as I have been able to successfully execute before, using only double quotes.

It's a requirement of Windows. Sometimes it manages to figure out alone that any spaces that may be in the path are not separators of arguments, but sometimes it fails. This can happen, for example, if you have "C:\Program.exe" while trying to execute "C:\Program Files\Something.exe". In this case, it'll think "Files\Something.exe" is an argument for "C:\Program.exe".


So this should work too?

ExecWait `"$EXEDIR\Test.exe"`

Assuming Test.exe really is in $EXEDIR, it should work.


OK, thanks Kichik!
I might be back with another problem regarding this though...