Reputation: 2304
I need to modify batch file.
I have a batch file that opens many tabs when I click icon from desktop. These tabs are opened in my ALREADY OPENED default browser.
I would like to have a NEW WINDOW open for these tabs.
The batch file looks like this:
@echo off
start "webpage name" "http://someurl.com/"
start "webpage name" "http://someurl.com/"
start "webpage name" "http://someurl.com/"
start "webpage name" "http://someurl.com/"
What changes do I need to make
Upvotes: 18
Views: 106872
Reputation: 307
For future visitors:
@echo off
set "google=https://www.google.com/"
set "stackoverflow=https://stackoverflow.com/"
REM This will be opened in the already opened browser window if there is one
start chrome.exe "%google%"
REM This will be opened in a new window
start chrome.exe -new-window "%stackoverflow%"
REM If you want multiple urls to be opened you can just add them
start chrome.exe -new-window "%stackoverflow%" "%google%"
Upvotes: 0
Reputation: 312
The answer for the year 2024 using the Chrome browser with default profile is:
@echo off
start chrome --new-window "https://www.google.com/" "https://www.google.de/"
Upvotes: 0
Reputation: 89
if all you have to do is to open multiple tabs at the same time in a single chrome window this is all you need
@echo off
start chrome "Your URL"
start chrome "Your URL"
start chrome "Your URL"
start chrome "Your URL"
Upvotes: -1
Reputation: 101
Try this:
@echo off
SET BROWSER=firefox.exe
SET WAIT_TIME=2
START %BROWSER% -new-window "website"
START %BROWSER% -new-window "website"
Upvotes: 9
Reputation: 2304
I figured this out.
The batch file to open a NEW browser window, and then the intended websites:
@echo off
"C:\Users\THEUSER\AppData\Local\Google\Chrome\Application\chrome.exe"
sleep1
start "webpage name" "http://someurl.com/"
start "webpage name" "http://someurl.com/"
start "webpage name" "http://someurl.com/"
start "webpage name" "http://someurl.com/"
It is working for me. The only caveat, is that if we have a set of pages to open when the new browser window starts up, these will be open too.
Solution? Create another batch file to open those intended websites, and use the desktop file icon to open these. THEN change browser's default configuration to not open specific website or home page on start up.
UPDATE After Alvaro commented on the browser not being the default browser:
For me the default browser is Chrome. Then, for you to set your default browser to open, the line "C:\Users\THEUSER\AppData\Local\Google\Chrome\Application\chrome.exe" should be changed to reflect the path of your intended browser
Upvotes: 16