Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 从命令行打开Chrome_Windows_Google Chrome_Batch File_Command Prompt - Fatal编程技术网

Windows 从命令行打开Chrome

Windows 从命令行打开Chrome,windows,google-chrome,batch-file,command-prompt,Windows,Google Chrome,Batch File,Command Prompt,我有以下批处理文件: @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

我有以下批处理文件:

@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关闭时消失。)

有没有办法防止这种情况?即,一旦网页打开,提示将不再被占用


它可以很好地打开网页。我还注意到,如果chrome窗口已经打开,批处理运行正常(留下可用的提示),将选项卡添加到现有的chrome会话中。

查看
start
命令。它应该做你想做的事情

此外,您还可以省略通往chrome的路径。在Windows 7上可以执行以下操作:


start chrome“site1.com”“site2.com”

使用start命令,如下所示

start“C:\ProgramFiles(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

这对您很有用。

打开命令提示符并键入

cd\ (enter)
然后键入

start chrome "www.google.com"(any website you require)

C:\>启动chrome”http://site1.com“
适用于Windows Vista。

您可以创建批处理文件并在其中插入以下行:

cmd /k start chrome "http://yourWebSite.com

然后,您只需双击此批处理文件。

让我们看看
start
命令

打开Windows命令提示符

要打开新的Chrome窗口(空白),请键入以下内容:

start chrome --new-window 
start chrome --new-window "http://www.iot.qa/2018/02/narrowband-iot.html"
start chrome --new-window --incognito "http://www.iot.qa/2018/02/narrowband-iot.html"

要在Chrome中打开URL,请键入以下内容:

start chrome --new-window 
start chrome --new-window "http://www.iot.qa/2018/02/narrowband-iot.html"
start chrome --new-window --incognito "http://www.iot.qa/2018/02/narrowband-iot.html"
要以匿名模式在Chrome中打开URL,请键入以下内容:

start chrome --new-window 
start chrome --new-window "http://www.iot.qa/2018/02/narrowband-iot.html"
start chrome --new-window --incognito "http://www.iot.qa/2018/02/narrowband-iot.html"


如果要打开“匿名”窗口,请执行以下命令:


启动chrome/incognito为
Ubuntu
用户解答此问题,以供参考

运行命令<代码>谷歌浏览器--应用程序url“http://localhost/“

在参数中替换所需的URL

你可以得到更多的选择,如隐姓埋名模式等。
运行
google-chrome--help
查看选项。

@Vidz use
start”““C:\Program Files(x86)\google\chrome\Application\chrome.exe”http://www.google.com
@Vidz谢谢。我也有同样的问题。但是我的dafault浏览器是IE(internet explorer)。您如何指定端口号?@NilsSens-您可以指定端口号,如
start chrome“http:localhost:88\bar”
,其中
88
是端口号。域和端口之间需要冒号。如何提供如下参数:google chrome--enable webgl--ignore gpu Blacklist在URL之前包含任何额外参数。启动chrome--启用webgl--忽略gpu黑名单“site1.com”“site2.com”如何使用用户配置文件打开?我有多个chrome用户配置文件@GavinHawesome这也适用于win 10这将起作用:
google chrome google.com
这对一年前给出的公认答案有什么影响?