Open 3 tabs in IE window with .cmd file


  1. Posts : 3
    Windows 7 Enterprise 64bit
       #1

    Open 3 tabs in IE window with .cmd file


    I tried to accomplished that, but it works only in chrome (my default browser) and i want it to work in IE.
    My goal is to open 3 tabs in IE. doesnt matter if they will open in a new IE window or existing IE window.
    This is my .cmd file:

    Code:
    START /d iexplore.exe "C:\Program Files (x86)\Internet Explorer\iexplore.exe" "http://marathon:7040/console/jsp/login/j_security_check?j_username=weblogic&j_password=weblogic"
    START /d iexplore.exe "C:\Program Files (x86)\Internet Explorer\iexplore.exe" "http://sparta:7040/console/jsp/login/j_security_check?j_username=weblogic&j_password=weblogic"
    START /d iexplore.exe "C:\Program Files (x86)\Internet Explorer\iexplore.exe" "http://wlsprod:7040/console/jsp/login/j_security_check?j_username=weblogic&j_password=weblogic"
    Last edited by erezyafee; 30 Sep 2014 at 09:26.
      My Computer


  2. Posts : 1,049
    Windows 7 Pro 32
       #2

    Hi and welcome to SevenForums!

    Add a /D after START, ex: START /D ""

    And add a short pause between each START command so the previous opened IE window has opened fully. Example:
    CHOICE /C:AB /D A /T 1 > NUL

    This will pause for 1 second without displaying anything. If that's not enough try and increase that value.
      My Computer


  3. Posts : 3
    Windows 7 Enterprise 64bit
    Thread Starter
       #3

    I now noticed that i didnt copy the right code so i edited my question. take a look on the code
    that code does excactly what i want, but because my default browser is chrome- it opens in crome.
    all i want is to open it through IE without change my default browser
      My Computer


  4. Posts : 1,049
    Windows 7 Pro 32
       #4

    I changed my default browser so now I get the same problem as you have. I can't get this to work when IE is not my default browser, but I found another solution using VB script:

    Code:
    Const navOpenInBackgroundTab = &H1000
    
    site1 = "google.com"
    site2 = "bing.com"
    site3 = "ddg.gg"
    
    Set oIE = CreateObject("InternetExplorer.Application")
    oIE.Visible = True
    oIE.Navigate2 site1
    oIE.Navigate2 site2,navOpenInBackgroundTab
    oIE.Navigate2 site3,navOpenInBackgroundTab
    
    Set oIE = Nothing
    Save the above to a text file and name it .vbs instead of .txt. Change the values for variable site1, site2, site3.
    If you want to call it from a .cmd file, use this example:

    cscript /nologo "c:\path\filename.vbs"
      My Computer


  5. Posts : 6,285
    Windows 10 Pro X64
       #5

    I tried a test. My default browser is Seamonkey (Mozilla spinoff).

    I entered a single line:

    START iexplore.exe "http://www.google.com"&START iexplore.exe "http://www.google.com"&START iexplore.exe "http://www.google.com"

    This opened 3 Internet Explorer windows for Google.
      My Computer


  6. Posts : 3
    Windows 7 Enterprise 64bit
    Thread Starter
       #6

    Thanks alot Tookeri!!! works very well!
    Ztruker- we talked about opening one window with 3 tabs. not 3 windows :)
      My Computer


  7. Posts : 6,285
    Windows 10 Pro X64
       #7

    Sorry, this line in your original post threw me:
    doesnt matter if they will open in a new IE window or existing IE window.
    I understand now.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 21:15.
Find Us