VBS 的RUN 函数本身带三个参数-隐藏后台运行模式 VBS 的RUN 函数本身带三个参数-隐藏后台运行模式 1
代码事例: DIM objShell set objShell=wscript
createObject("wscript
shell") iReturn=objShell
Run("cmd
exe /C C:\addolcli\AddolC
exe", 0, TRUE) VBS 的RUN 函数本身带三个参数,第一个参数就是你要运行的程序 第二个参数就是用来控制运行窗口模式 有0-9 模式 其中0 是隐藏后台运行,6 是最小化运行 具体可以参数MSDN 帮助文档 SW_HIDE 0 Hides the window and activates another window
SW_MINIMIZE 6 Minimizes the specified window and activates the next top-level window in the Z order
SW_RESTORE 9 Activates and displays the window
If the window is minimized or maximized, Windows restores it to its original size and position
An application should specify this flag when restoring a minimized window
Run 的第三个参数将允许我们防止相关程序以并发方式运行
您可将第三个参数赋值为 True,以便指示脚本停留在使用Run方法的代码行并保持等待状态,直到已被激活的程序运行完毕
我们已经知道了因未设定该参数所产生的后果,该参数在缺省状态下被设定为 False,而这