等待第二个 VBScript 脚本,直到主 VBScript 脚本结束 [英] Wait for the second VBScript script until ended from primary VBScript script

查看:30
本文介绍了等待第二个 VBScript 脚本,直到主 VBScript 脚本结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行第二个 VBScript 脚本的 VBScript 脚本.第二个 VBScript 脚本从输入框中询问一些问题.我的问题是MyShell.Run"不会等到 SecondVBscript.vbs 结束.并且其他 VBScript 语法也很不礼貌地运行

I have a VBScript script that runs a second VBScript script. The second VBScript script asks some questions from the input box. My problem is that "MyShell.Run" does not wait until SecondVBscript.vbs has ended. And the other VBScript syntax run immodestly also

我需要等待 MyShell.Run 进程结束,然后执行其他 VBScript 语法.我该怎么做?

I need to wait for the MyShell.Run process to end and then perform the other VBScript syntax. How can I do that?

Set MyShell = Wscript.CreateObject("WScript.Shell")

MyShell.Run " C:\Program Files\SecondVBscript.vbs"

Set MyShell = Nothing

其他 VBScript 语法

Other VBScript syntax

推荐答案

Run 方法有一个可选参数 bWaitOnReturn,如果将其设置为 true,则不会它等待呢?请参阅此处,了解<代码>运行命令.

The Run method has an optional argument bWaitOnReturn, if you set that to true, won't it wait then? See here for the documentation of the Run command.

这篇关于等待第二个 VBScript 脚本,直到主 VBScript 脚本结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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