Old 25th August 2003, 13:06   #1
banaman8d
Junior Member
 
Join Date: May 2003
Posts: 19
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.
banaman8d is offline   Reply With Quote
Old 25th August 2003, 13:26   #2
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Try to put quotes around the filename ($\").
Joost Verburg is offline   Reply With Quote
Old 25th August 2003, 14:42   #3
banaman8d
Junior Member
 
Join Date: May 2003
Posts: 19
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....
banaman8d is offline   Reply With Quote
Old 25th August 2003, 16:57   #4
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
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.
code:
ExecWait '"$INSTDIR\command.exe" parameters'
Notice how there are double-quotes around the program name and single-quotes around everything after ExecWait.
pengyou is offline   Reply With Quote
Old 14th November 2003, 21:24   #5
putty
Junior Member
 
Join Date: Nov 2003
Posts: 4
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)

Quote:
Originally posted by pengyou
The example given in the User Manual explains this but it is easy to miss.
code:
ExecWait '"$INSTDIR\command.exe" parameters'
Notice how there are double-quotes around the program name and single-quotes around everything after ExecWait. [/B]
putty is offline   Reply With Quote
Old 14th November 2003, 22:29   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Seems right. Make sure $TEMP\flash.exe is really there on Windows 98.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 15th November 2003, 02:22   #7
putty
Junior Member
 
Join Date: Nov 2003
Posts: 4
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.
putty is offline   Reply With Quote
Old 15th November 2003, 11:27   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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:
code:
ClearErrors
ExecWait '"$TEMP\flash.exe"'
IfErrors ...


NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump