Archive: ExecWait problems with certain executables


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.


Try to put quotes around the filename ($\").


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....


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.

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]

Seems right. Make sure $TEMP\flash.exe is really there on Windows 98.


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.


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 ...