tags:

views:

31

answers:

2

dim shell,x,y
x="D:\d"
y="c.bat " & x
set shell=createobject("wscript.shell")
shell.run y
shell.run "a.bat"

set shell=nothing
when i run this script, it runs both batch files simultaneously. what i need is that it should run the first batch file(c.bat) and after it is completely executed, it should execute other(a.bat)
what i need works if i make another batch file and use:
call c.bat
call a.bat

+1  A: 

Try this:


shell.run y, 1, true
shell.run "a.bat", 1, true

for details: http://msdn.microsoft.com/en-us/library/d5fk67ky(VS.85).aspx

xycf7
works perfectly. thanks a lot :)
sushant
The last parameter (true) means to wait for the program to finish before continuing.
aphoria
A: 

I don't know how to do it in VBScript, but you can create another batch file seq.bat that simply has the following and call it with 'seq.bat d:\d'

@echo off
call c.bat %1
call a.bat 1
kenny