【发布时间】:2019-05-12 23:57:01
【问题描述】:
我正在尝试从另一个调用 vbs 文件。被调用的文件执行。但是,控件不会返回到原始 vbs 文件。当我在任务管理器中看到 wscript 进程时,该文件似乎正在运行。但我没有看到输出 - 运行命令之后的步骤。任何帮助/建议将不胜感激。
1.) vbs文件1(原始vbs文件test3.vbs)
Set objShell = WScript.CreateObject ("WScript.shell")
strErrorCode = objShell.run("cmd /K C:\temp\a\test2.vbs", 0, True)
msgbox "complete test3"
Set objShell = Nothing
2.) vbs 文件 2(称为 vbs 文件 - test2.vbs)
msgbox "in test2"
WScript.Sleep 10000
msgbox "complete - test2"
3.) 预期输出:
in test2
complete - test2
complete test3
4.) 实际:
in test2
complete - test2
【问题讨论】:
标签: vbscript