How to open multiple tabs in IE8 from the command prompt?

9,126

AFAIK IE doesn't support multiple URLs as command-line parameters. You can invoke it multiple times with a single URL each from a batch file or something, but that seems to open separate windows. For launching multiple URLs in tabs in a single IE window, use the following script:

var navOpenInBackgroundTab = 0x1000;
var objIE = new ActiveXObject("InternetExplorer.Application");
objIE.Navigate2("http://www.site1.com");
objIE.Navigate2("http://www.site2.com", navOpenInBackgroundTab);
objIE.Navigate2("http://www.site3.com", navOpenInBackgroundTab);
objIE.Visible = true;

Save as StartIE.js, then either double-click in Windows Explorer, or use wscript.exe StartIE.js at the command prompt to launch.

Share:
9,126

Related videos on Youtube

srikanth
Author by

srikanth

Updated on September 18, 2022

Comments

  • srikanth
    srikanth almost 2 years

    What command line options can I use for opening multiple tabs in IE 8 from the command prompt or a .bat file? I've tried the URLs separated by "", commas, <> and |, but nothing has worked.

  • Karan
    Karan over 11 years
    You're welcome! Since you're new here, don't forget to accept whichever answer (if there are multiple) best solves your issue.
  • tiaga
    tiaga over 10 years
    Cheers - works for me