Opening Chrome from the command line

I have the following batch file:

@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" 

But when I run it, it causes the invitation to hang and makes it unusable until Chrome is closed. (Or, if I don’t use the prompt and run it from the icon, it opens a blank prompt that is unusable and disappears when Chrome is closed.)

Is there any way to prevent this? I.E. after the web pages are open, the invitation is no longer associated.

It just opens web pages. I also noticed that if a chrome window is open, the package works fine (leaving a useful prompt), adding tabs to an existing chrome session.

+44
windows google-chrome batch-file command-prompt
Jan 15 '13 at 23:27
source share
5 answers

Look at the start command. He must do what you are trying to achieve.

In addition, you can leave the path to chrome. On Windows 7, the following works:

start chrome "site1.com" "site2.com"

+108
Jan 15 '13 at 23:30
source share
β€” -

C:\>start chrome "http://site1.com" works on Windows Vista.

+6
Feb 22 '14 at 15:35
source share

Use the launch command as follows.

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

It’s better to close chrome instances before you open a new one. You can do it as follows:

 taskkill /IM chrome.exe start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://www.google.com 

This will work for you.

+5
04 Oct '13 at
source share

you can create a batch file and paste the following line into it:

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

after that, you simply double-click this batch file.

+3
Nov 23 '16 at 8:52
source share

open command prompt and type

 cd\ (enter) 

then enter

 start chrome "www.google.com"(any website you require) 
+1
Nov 05 '13 at 17:38
source share



All Articles