Skip to content

Instantly share code, notes, and snippets.

@jawn
Last active January 21, 2024 19:56
Show Gist options
  • Save jawn/611bb80f5bee309000919277c41b66c2 to your computer and use it in GitHub Desktop.
Save jawn/611bb80f5bee309000919277c41b66c2 to your computer and use it in GitHub Desktop.
Launch new browser instance from Windows command line or batch file
REM Open new Chrome instance with two tabs
REM Thanks to https://stackoverflow.com/a/46488816/65545
start chrome --new-window "https://www.facebook.com" "https://www.microsoft.com"
REM Open new Chrome instance with single tab
start chrome --new-window "https://www.google.com"
REM Works with the new, Chromium based Edge
REM Open new Edge instance with two tabs
start msedge --new-window "https://www.facebook.com" "https://www.microsoft.com"
REM Open new Edge instance with single tab
start msedge --new-window "https://www.google.com"
@AlexDeMoura
Copy link

Maybe I am wrong, but I believe there is confusion between "New instance" and "New window" - in both cases, Chrome and Edge - will open a "New window" (with a selected URL) if the production browser (with all your working tabs) is already open. But if the production browser is closed, the "start" command or any desktop shortcut containing the "--new-window" switch will open the entire production browser, and the selected URL will be just one tab among all the working tabs. In my opinion, we could not consider one of the situations as an "instance"...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment