53

The default behavior of running chrome via the command-line:

chrome www.google.com

opens a new tab in an existing instance of chrome and moves the focus from the terminal to the newly created tab.

Adding the new-window switch:

chrome --new-window www.google.com

opens chrome in a new window but does not move the focus.

What options should I use to open a new window but also switch focus to that window?

Note: I'm using Windows 7.

Isaac Kleinman
  • 709
  • 1
  • 6
  • 10

4 Answers4

50

try this one

start chrome /new-window www.google.com

opens google.com in a new instance of chrome.

Pascal
  • 516
1

Give a time and it will focus on active window:

start chrome.exe --new-window "http://hotmail.com"

start chrome.exe --new-window "http://gmail.com"

TIMEOUT 1

start chrome.exe "http://yahoo.com"
shdcol
  • 21
0

in 2023, with Chrome version Version 110.0.5481.97 (Build officiel) (64 bits), starting Chrome using START Dos command doesn't work anymore !

The solution that works on my Windows 11 PC

set chrome="C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
start "test" %chrome% --new-window "www.google.com"

or

%chrome% --new-window "www.google.com"

If using START Dos command, first parameter just after start string is imperative !

If I run following commands,

set chrome="C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
start %chrome% --new-window "www.google.com"

Windows return an error message that indicate that it doesn't find "--new-window" !

enter image description here

I use START command to load multiples LOCAL files in Chrome using following BAT script

set chrome="C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
set dirname=%cd%

set url= set url=%url% "file:///%dirname%\TABLES.CUMUL.SOLAIRE.html" set url=%url% "file:///%dirname%\CHARTS.CUMUL.SOLAIRE.html" set url=%url% "file:///%dirname%\TABLES.CUMUL.JOUR_NUIT.html" set url=%url% "file:///%dirname%\CHARTS.CUMUL.JOUR_NUIT.html" set url=%url% "file:///%dirname%\TABLES.CUMUL.JOUR_NUIT_SOLAIRE.html" set url=%url% "file:///%dirname%\CHARTS.CUMUL.JOUR_NUIT_SOLAIRE.html" set url=%url% "file:///%dirname%\TABLES.CUMUL.EXCLUSIF.html" set url=%url% "file:///%dirname%\CHARTS.CUMUL.EXCLUSIF.html"

start "kWh" %chrome% --new-window %url%

schlebe
  • 325
-1

You can try following command for the same.

start chrome google.com

It will open Google in the new window of the chrome and also gets focused on that webpage.