2014-09-22 21 views
0

作为控制台应用程序的一部分,我想在Chrome中点击一个URL而不显示浏览器窗口。这可能吗?从命令行调用Chrome而不显示UI

我已经使用/B与命令提示符:

start "" /B "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "google.com"

回答

0

您需要VBScript来隐藏窗口。

Set WshShell = WScript.CreateObject("WScript.Shell") 

msgbox FormatNumber(WshShell.Run("cmd /k dir c:\windows\*.*", 0, false)) 

喜欢的东西

Set WshShell = WScript.CreateObject("WScript.Shell") 

WshShell.Run wscript.Arguments(0), 0, false 
在VBS文件

。使用

C:\Users\User>"C:\Users\User\Desktop\RunHidden.vbs" "notepad"