13

I would like to know if it is possible, with cmd, to open a new tab with a specific URL in a running Google Chrome. If yes, How??

So here what I've tried with what happened.

  1. Command-Line Option to Open Chrome in New Window and Move Focus

    The solution of this question worked half, it opened a new tab with the needed URL, but also a new window. But I need to open a specific page in a running Google Chrome.

  2. https://bugs.chromium.org/p/chromium/issues/detail?id=26728

    According to what I've understood from this source, it is impossible to do so with cmd. I think I misunderstood, but I don't see where.

Also, the command, chrome ... doesn't seem to work. CMD says:

'chrome' is not recognized as an internal or external command, operable program or a batch file

I'm using Windows 10.

8 Answers 8

8

If Chrome is your default browser, you can try this:

start "" "http://www.google.com"

It will open the URL in the existing window or start your default browser if you haven't opened one yet.

You can also set the limitation to not to open the link if the browser isn't running:

tasklist /nh|findstr "chrome.exe"&&start "" "http://www.google.com"

This will open the URL only if chrome.exe has been found within the running tasks.

3
  • Thank you, the first command was what I've been searching for. What David wasn't wrong, but it made me open another window. I wanted to be working with an already opened one and add tabs to it. Thank you for both of your time.
    – Bog Ru
    Commented Jun 26, 2017 at 22:09
  • 1st command worked but it opened IE as it is default. 2nd din't work as there were many chrome instances running so it listed all instead of opening in one of the running chromes. Commented Jul 14, 2018 at 15:07
  • When the browser is opened: is there a way to open it silently (without changing the current page)?
    – JinSnow
    Commented Oct 23, 2021 at 9:08
3

The command, chrome ... doesn't seem to work

'chrome' is not recognized as an internal or external command, operable program or a batch file

That is because chrome is not in your path. You can add the Chrome directory to your path (see What are PATH and other environment variables, and how can I set or use them?) or use the full path to Chrome when running it.

Example:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"

Is it possible, with cmd, to open a new tab with a specific URL in a running Google Chrome?

Yes.

Example:

rem start chrome
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
rem open google in a tab in the already running chrome
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" google.com
2
  • Ok, so now my idea works at 75%, I was able to add a new tab to an existing Chrome window, but I had to create a new window first. What if I don't want to open it. Chrome is already open on the screen, I just want to add new tabs to the one on the screen.
    – Bog Ru
    Commented Jun 26, 2017 at 1:21
  • @BogRu I don't understand. That's exactly what happens when you run the second command.
    – DavidPostill
    Commented Jun 26, 2017 at 7:26
2

Answering this for Ubuntu users for reference.

Run command google-chrome --app-url "http://localhost/"

Replace your desired URL in the parameter.

You can get more options like incognito mode etc. Run google-chrome --help to see the options.

1
  • 1
    Also works on Windows thank you Commented Dec 15, 2021 at 11:58
1

Other answers gave good details, just accumulating from all & my trials:

start command

Below opened default browser (IE for me in Windows 10):

start "" "http://www.google.com"

tasklist command

"tasklist /nh|findstr .." This din't work, possibly because now Chrome runs several instances of chrome, some background and some foreground, so it only listed all chrome instances as in task manager.

%ProgramFiles(x86)\..\chrome.exe

For me, first one opened a new tab in already running Chrome, else opens a new window:

"%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe" "http://www.google.com"

If above din't work, below may work:

"%ProgramFiles%\Google\Chrome\Application\chrome.exe" "http://www.google.com"

%ProgramFiles(x86)% helps to skip to mention if it is C:\ or D:\ or other

1

Here's the solution to that.

If you havent opened chrome yet try writing this in CMD:

start chrome instagram.com/albotravel

That's my page as an example, now if you want to open another tab on that existing/running chrome that we just opened type this in CMD:

start chrome /new-tab instagram.com/albografi

That's it!

1

start chrome chrome-search://local-ntp/local-ntp.html This brings up a blank new tab, and if there's no current window for google it'll bring up google.

0

use win+R combination key and type the following command: chrome /new-tab www.google.com

1
  • In OP's question, they stated: "'chrome' is not recognized as an internal or external command, operable program or a batch file" when trying this- what do you suggest?
    – bertieb
    Commented Mar 24, 2018 at 22:25
0

I have tried to find a command that will work as per your requirement. You can try the following command to open a new tab in existing chrome through cmd.

start chrome.exe *URL*

Put your Url after start command and it will open a new tab in the existing chrome.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .