rmccue
2nd June 2007 08:15 UTC
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?
Red Wine
2nd June 2007 08:50 UTC
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?
rmccue
2nd June 2007 08:55 UTC
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
kichik
2nd June 2007 09:02 UTC
You must quote the path.
ExecWait '"$EXEDIR\Test.exe"'
rmccue
2nd June 2007 09:05 UTC
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.
kichik
2nd June 2007 09:10 UTC
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".
rmccue
2nd June 2007 09:13 UTC
So this should work too?
ExecWait `"$EXEDIR\Test.exe"`
kichik
2nd June 2007 09:40 UTC
Assuming Test.exe really is in $EXEDIR, it should work.
rmccue
2nd June 2007 09:43 UTC
OK, thanks Kichik!
I might be back with another problem regarding this though...