batch file to open tabs in a NEW browser window

前提是你 提交于 2020-01-01 02:29:12

问题


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


回答1:


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




回答2:


This is much simpler:

start chrome.exe yahoo.com 



回答3:


Try this:

@echo off

SET BROWSER=firefox.exe
SET WAIT_TIME=2
START %BROWSER% -new-window "website"
START %BROWSER% -new-window "website"



回答4:


start chrome "google.com"

.exe is not required



来源:https://stackoverflow.com/questions/8143132/batch-file-to-open-tabs-in-a-new-browser-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!