gpt4 book ai didi

vbscript - 顺序执行批处理文件

转载 作者:行者123 更新时间:2023-12-03 06:44:11 24 4
gpt4 key购买 nike

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

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

call c.bat  
call a.bat

最佳答案

试试这个:


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

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

关于vbscript - 顺序执行批处理文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2590385/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com