Page 1 of 1 1
Topic Options
#81903 - 1999-06-11 10:56 AM Running Batch files From Kix
Anonymous
Unregistered


what is the syntax for running batch files from within kix scripts

[ 12 March 2002, 05:21: Message edited by: kdyer ]

Top
#81904 - 1999-06-12 07:06 AM Re: Running Batch files From Kix
Anonymous
Unregistered


You can use SHELL "batch.bat"
or: RUN "batch.bat"

or : SHELL "%comspec% /e:1024 /c "batch.bat"

------------------
Lon Geefshuysen
Lon_Geefshuysen@essentium.com



Top
#81905 - 2002-03-13 02:04 AM Re: Running Batch files From Kix
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
If you find you need to include quotes on the command line, there are several ways to go.

1. Use single quotes outside and double quotes inside.
SHELL '%comspec% /c "C:\Program Files\Internet Explorer\iexplore.exe" about:blank'

2. Use Chr(34) in place of double quotes.

3. Assemble the shell command as a string.
$ShellCMD = Chr(34) + $WorkDir + "\symcdefsx86.exe" + Chr(34) + " /q /extract /vdb " + $TempDir
Shell '$ShellCMD'

The difference between SHELL and RUN is that RUN returns to the script immediately and allows it to continue. SHELL normally will hold the script untill the shelled program terminates. In some cases, the shelled program calls another and terminates, returning control to the script prematurely. Using Start /W could mitigate that.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Radimus, Glenn Barnas, Allen, Arend_, ShaneEP, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 626 anonymous users online.
Newest Members
min_seow, Audio, Hoschi, Comet, rrosell
17881 Registered Users

Generated in 0.127 seconds in which 0.066 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org