problem opening multiple web pages in multiple tabs in IE7

Posted on 2009-05-08
Last Modified: 2013-12-08
I wrote a simple batch file to open up eight html pages. I want them to open up in multiple tabs in the same browser. I have ie set to use the tabs. When I click on the bat file it does something weird...
It opens up page one in an IE browser.
Then, it opens page two in a second browser.
Then, it just sits there, in the middle of the bat file with the cursor blinking at me stupidly.
If I close the second browser, it opens pages three through eight in the first (still open) browser.
If I close the first browser, it does nothing. I have to then close the second browser too. Then, report three opens in it's own browser. I close it. Report four opens the same way. This happens with each of the following pages. Can someone explain to me what's happening? The code is (basically) as follows:

start iexplore.exe \\server\Reports\page1.html

start iexplore.exe \\server\Reports\page1.html

Open in new window

Question by:StarbuckLives

Accepted Solution

wellhole earned 100 total points
ID: 24338249
Create a file called myscript.js and insert script below. In your batch file, just run wscript myscript.js
var navOpenInBackgroundTab = 0x1000;
var oIE = new ActiveXObject("InternetExplorer.Application");
oIE.Navigate2("\\server\Reports\page2.html", navOpenInBackgroundTab);
oIE.Navigate2("\\server\Reports\page3.html", navOpenInBackgroundTab);
oIE.Navigate2("\\server\Reports\page4.html", navOpenInBackgroundTab);
oIE.Navigate2("\\server\Reports\page5.html", navOpenInBackgroundTab);
oIE.Navigate2("\\server\Reports\page6.html", navOpenInBackgroundTab);
oIE.Navigate2("\\server\Reports\page7.html", navOpenInBackgroundTab);
oIE.Navigate2("\\server\Reports\page8.html", navOpenInBackgroundTab);
oIE.Visible = true;

Open in new window


Author Closing Comment

ID: 31579545
Perfect, thanks.

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question