Batch file to open multiple tabs in Internet Explorer

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
bkoopers
Posts: 2
Joined: 14 Nov 2013 23:33

Batch file to open multiple tabs in Internet Explorer

#1 Post by bkoopers » 15 Nov 2013 06:48

I need a batch file that will open multiple web pages in one window in Internet Explorer each in separate tabs with the last tab on the right being the active one.

The actual purpose for this is because of a strange action that is happening for a webpage that I am working with that is opened via a url with a number parameters via Oracle code. When the page loads in Internet Explorer, the url address box changes to a simplified form of the url dropping out the parameters.The Oracle code periodically issues a page refresh but it then refreshes with the url without the parameters so the page does not get displayed properly. As a workaround, I discovered that if you open the same url again in another tab, the parameters remain in the url box so it will get refreshed properly. Therefore, I need a script to open the url twice in separate tabs but have the second tab as the active tab.

Can anyone please provide a batch file that can open multiple tabs and set the last (right-most) tab active (foreground)?

If this cannot be done with a batch file, can somebody recommend a script (vb or java) that can do this?

Thanks to anyone who can help me out.

foxidrive
Expert
Posts: 6033
Joined: 10 Feb 2012 02:20

Re: Batch file to open multiple tabs in Internet Explorer

#2 Post by foxidrive » 15 Nov 2013 07:04

Can you create a batch file, and call that from the oracle code?


Code: Select all

@echo off
start "" "http://www.website.com/with the rest here"



This will open the default web browser with the page.

bkoopers
Posts: 2
Joined: 14 Nov 2013 23:33

Re: Batch file to open multiple tabs in Internet Explorer

#3 Post by bkoopers » 15 Nov 2013 07:16

foxidrive: Thank you for your response.

I am the user of the Oracle code (not the developer) so I cannot modify the Oracle code. Somebody else is working on that. I am looking for a temporary fix that allows me to get around this problem but opening the 2nd tab and setting it active. That way I can set the computer to automatically startup and run this script.

foxidrive
Expert
Posts: 6033
Joined: 10 Feb 2012 02:20

Re: Batch file to open multiple tabs in Internet Explorer

#4 Post by foxidrive » 15 Nov 2013 07:28

Assuming Internet Explorer is the default web browser, try this. IE will have to be configured to open in TABS and not in separate windows.

I have doubts that it will work as the URL refreshing may be controlled by the oracle side, which could be the problem, but get back to us and let us know.

Code: Select all

@echo off
start "" "http://www.website.com1/with the rest here"
ping -n 2 localhost >nul
start "" "http://www.website.com2/with the rest here"
ping -n 2 localhost >nul
start "" "http://www.website.com3/with the rest here"
ping -n 2 localhost >nul
start "" "http://www.website.com4/with the rest here"
ping -n 2 localhost >nul
start "" "http://www.website.com5/with the rest here"

Dos_Probie
Posts: 233
Joined: 21 Nov 2010 08:07
Location: At My Computer

Re: Batch file to open multiple tabs in Internet Explorer

#5 Post by Dos_Probie » 16 Nov 2013 13:44

If you want to open multiple pages that automatically load up every time you start Internet Explorer..

Code: Select all

@echo off
set primary=http://www.bing.com/
set secondary1=http://www.dostips.com/
reg add "HKCU\Software\Microsoft\Internet Explorer\Main" /v "Start Page" /t REG_SZ /d "%primary%" /f
reg add "HKCU\Software\Microsoft\Internet Explorer\Main" /v "Secondary Start Pages" /t REG_MULTI_SZ /d "%secondary1%" /f

Or if you want to assign "multiple secondary start pages" via script file..
http://blogs.technet.com/b/heyscripting ... r-7-0.aspx

Post Reply