banaman8d
25th August 2003 14:06 UTC
ExecWait problems with certain executables
I have encountered some problems trying to run the windows service packs with ExecWait.
The problem is that if I pass the executables options in the ExecWait command like /Z (so it doesn't cause a reboot), it seems to not see it. However, if I open a command shell (Open->Run... type cmd) and type the command it runs and the command line arguments work.
Why would this happen?
I am using:
C:\...\2000\sp4-en /Z
for the shell command and
ExecEait "2000\sp4-en ${ARGS}" for the
NSIS command.
NOTE: I haven't used the Exec* commands much so please forgive me if this is elementary.
Joost Verburg
25th August 2003 14:26 UTC
Try to put quotes around the filename ($\").
banaman8d
25th August 2003 15:42 UTC
Ok,
Here's the latest... I tried puitting the command in quotes, and it does exactly the same thing. If I give the command with certain switches (like /Q for quiet) it will work. If I give the switches in a different order (like /Z first) it works, but I can't tell if the rest of the switches are used.
It appears that it may be the executable handles args a little 'creatively'. But it only seems to be 'creative' when running from ExecWait, not the command line.
hmmm....
pengyou
25th August 2003 17:57 UTC
Have you double-checked your ExecWait command? You need to be careful with the single and double quotes.
The example given in the User Manual explains this but it is easy to miss.
ExecWait '"$INSTDIR\command.exe" parameters'
Notice how there are double-quotes around the program name and single-quotes around everything after ExecWait.
putty
14th November 2003 22:24 UTC
I'm trying to install the flash player in my script.
This line doesn't work on Win98, works on Win2k:
ExecWait '"$TEMP\flash.exe"'
What am I missing? Do I need to add parameters in? (I wouldn't know what they should be)
Originally posted by pengyou
The example given in the User Manual explains this but it is easy to miss.
ExecWait '"$INSTDIR\command.exe" parameters'
Notice how there are double-quotes around the program name and single-quotes around everything after ExecWait. [/B]
kichik
14th November 2003 23:29 UTC
Seems right. Make sure $TEMP\flash.exe is really there on Windows 98.
putty
15th November 2003 03:22 UTC
I check the error flag after ExecWait, like
IfErrors err_lbl
does that return different error code in win98 and win2k?
the player is actually installed after execwait is done, it;s jsut the error flag is set differently.
kichik
15th November 2003 12:27 UTC
It might be an error coming from something else if you haven't cleared the error flag before you called an instruction you want to check. Use:
ClearErrors
ExecWait '"$TEMP\flash.exe"'
IfErrors ...