0

I'm trying to find a way to make a shortcut for Google Chrome that will open multiple IP based links in multiple tabs.

I have this line of code in the .bat file.

@echo off
start Chrome “111.95.192.176/Audit/WebPages/Login.aspx”
start Chrome “111.95.192.176/AirAudit/WebPages/Login.aspx”
start Chrome “111.95.192.176/Helpdesk/Login.aspx”
start Chrome “111.95.192.176/SPM_Audit/Login.aspx”

But in Google chrome it display some error after open the batch file (.bat)

This site can’t be reached
xn--http-uqa’s server DNS address could not be found.
ERR_NAME_NOT_RESOLVED

How could I resolve this error?

Note: In code IP address is not original one.

Mofi
  • 46,139
  • 17
  • 80
  • 143
Kusum
  • 501
  • 2
  • 11
  • 30

2 Answers2

2

Command START interprets first double quoted string often as title string. Therefore it is advisable to explicitly define a title string which in case of starting a GUI application is simply an empty string.

Command processor interprets only straight double quotes " as double quote with special meaning. All other double quotes are interpreted literally.

To open multiple pages in Google Chrome specify all the URLs as arguments on one command line.

@echo off
start "" chrome.exe "111.95.192.176/Audit/WebPages/Login.aspx" "111.95.192.176/AirAudit/WebPages/Login.aspx" "111.95.192.176/Helpdesk/Login.aspx" "111.95.192.176/SPM_Audit/Login.aspx"

Of course there is no need to use a batch file at all as you can specify in shortcut chrome.exe with full path in double quotes and the URLs to open as arguments directly.

PS: Not tested with Google Chrome has I don't have this browser installed.

Mofi
  • 46,139
  • 17
  • 80
  • 143
  • Sir I have to open 15 links. – Kusum Mar 28 '16 at 11:26
  • Well, 4 or 15 URLs on command line does not really matter for the batch file solution if not exceeding the limit of 8191 characters. The command line in shortcut file can have only up to 259 characters. So when exceeding this limit, this batch file solution is really needed. See answers and comments on [Maximum Length of Command Line String](http://stackoverflow.com/questions/3205027/) for more details about various limits depending on operating system version. – Mofi Mar 28 '16 at 17:45
1

Got the correct code:

@echo off
    start "" http:\\111.95.192.176/Audit/WebPages/Login.aspx
    start "" http:\\111.95.192.176/AirAudit/WebPages/Login.aspx
    start "" http:\\111.95.192.176/Helpdesk/Login.aspx
    start "" http:\\111.95.192.176/SPM_Audit/Login.aspx

NOTE: Google Chrome is default web browser.

Kusum
  • 501
  • 2
  • 11
  • 30