代码示例:
DIM objShell
set objShell=wscript.createObject("wscript.shell")
iReturn=objShell.Run("cmd.exe /C 1.bat", 0, TRUE)
iReturn=objShell.Run("cmd.exe /C 2.bat", 0, TRUE)
保存为test.vbs,双击执行,也是不会看到运行窗口的,实现了批处理的静默运行
1.bat 为bat文件名称,bat 文件中写自己的脚本
代码示例:
DIM objShell
set objShell=wscript.createObject("wscript.shell")
iReturn=objShell.Run("cmd.exe /C 1.bat", 0, TRUE)
iReturn=objShell.Run("cmd.exe /C 2.bat", 0, TRUE)
保存为test.vbs,双击执行,也是不会看到运行窗口的,实现了批处理的静默运行
1.bat 为bat文件名称,bat 文件中写自己的脚本