windows在后台执行命令行程序

2018-12-20  本文已影响0人  小凶许不松

You could run it silently using a Windows Script file instead. The Run Method allows you running a script in invisible mode. Create a .vbs file like this one

Dim WinScriptHost
Set WinScriptHost = CreateObject("WScript.Shell")
WinScriptHost.Run Chr(34) & "C:\Scheduled Jobs\mybat.bat" & Chr(34), 0
Set WinScriptHost = Nothing
and schedule it. The second argument in this example sets the window style. 0 means "hide the window."

上一篇 下一篇

猜你喜欢

热点阅读