![](/img/trans.png)
[英]Opening the most recent file in a directory from the command line in Windows 7
[英]Opening Chrome From Command Line
我有以下批處理文件:
@echo off
REM Starts a chrome browser with multiple tabbed sites
C:\Users\UserName\AppData\Local\Google\Chrome\Application\chrome.exe "site1.com" "site2.com"
但是當我運行它時,它會導致提示掛起並使其無法使用,直到 Chrome 關閉。 (或者,如果我沒有使用提示並從圖標運行它,它會打開一個無法使用的空白提示,並在 Chrome 關閉時消失。)
有什么辦法可以防止這種情況發生嗎? IE一旦網頁打開,提示不再綁定。
它可以很好地打開網頁。 我還注意到,如果已經打開了 chrome window,則批處理運行良好(留下可用提示),將選項卡添加到現有的 chrome session。
查看start
命令。 它應該做你想要達到的目標。
此外,您可能可以省略 chrome 的路徑。 以下適用於 Windows 7:
start chrome "site1.com" "site2.com"
使用啟動命令如下。
start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://www.google.com
在打開新實例之前關閉 chrome 實例會更好。 你可以這樣做:
taskkill /IM chrome.exe
start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://www.google.com
這對你有用。
C:\>start chrome "http://site1.com"
適用於 Windows Vista。
讓我們看一下start
命令。
打開 Windows 命令提示符
要打開新的 Chrome 窗口(空白),請鍵入以下內容:
start chrome --new-window
或者
start chrome
要在 Chrome 中打開 URL,請鍵入以下內容:
start chrome --new-window "http://www.iot.qa/2018/02/narrowband-iot.html"
要在 Chrome 中以隱身模式打開 URL,請鍵入以下內容:
start chrome --new-window --incognito "http://www.iot.qa/2018/02/narrowband-iot.html"
或者
start chrome --incognito "http://www.iot.qa/2018/02/narrowband-iot.html"
您可以創建批處理文件並將以下行插入其中:
cmd /k start chrome "http://yourWebSite.com
之后,您只需雙擊此批處理文件。
打開命令提示符並輸入
cd\ (enter)
然后輸入
start chrome "www.google.com"(any website you require)
回答這個問題供Ubuntu
用戶參考。
運行命令google-chrome "http://localhost/"
在參數中替換您想要的 URL。
您可以獲得更多選項,例如隱身模式等。運行google-chrome --help
以查看選項。
如果要打開隱身窗口,請輸入以下命令:
啟動鉻/隱身
開始鍍鉻
只需在 windows 終端中鍵入start chrome 。
Windows:type on Command Prompt and hit enter.
start chrome (chrome)
start firefox (firefox)
Ubuntu:type on terminal and hit enter.
google-chrome (chrome)
firefox (firefox)
if you want to open with path you have to added relative path with command(google-chrome www.facebook.com)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.