顺序执行批处理文件 [英] executing batch files sequentially

查看:48
本文介绍了顺序执行批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

dim shell,x,yx="D:\d"y="c.bat" &Xset shell=createobject("wscript.shell")shell.run yshell.run "a.bat"设置外壳=无

当我运行这个脚本时,它会同时运行两个批处理文件.我需要的是它运行第一个批处理文件(c.bat),在它完全执行后,它应该执行另一个批处理文件(a.bat).
如果我制作另一个批处理文件并使用,我需要的工作正常:

调用c.bat调用a.bat

解决方案

试试这个:

<前><代码>shell.run y, 1, trueshell.run "a.bat", 1, true

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

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 run the first batch file(c.bat) and after it is completely executed, it should execute the other batch file(a.bat).
What I need works fine if I make another batch file and use:

call c.bat  
call a.bat

解决方案

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

这篇关于顺序执行批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆