Open tabs in internet explorer with cmd

前端 未结 4 585
醉酒成梦
醉酒成梦 2021-01-16 14:51

I want to make a cmd batch file that opens 3 tabs in internet explorer window Doesnt matter to me if there is already internet explorer window open or not I have this comman

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-16 15:31

    I have provided some code for .bat files that should achieve the functionality you are looking for.

    To use: copy the code to a Notepad window and save as MyFile.bat or some other filename ending in .bat and double-click the file to run.

    To open Internet Explorer with 1 window and 3 separate tabs:

    :: n pings take n-1 seconds
    start "C:\Program Files\Internet Explorer\iexplore.exe" "https://www.google.com/"
    ping 127.0.0.1 -n 2 > nul
    start "C:\Program Files\Internet Explorer\iexplore.exe" "https://www.google.com/"
    ping 127.0.0.1 -n 2 > nul
    start "C:\Program Files\Internet Explorer\iexplore.exe" "https://www.google.com/"
    

    To open Internet Explorer with 1 window and 3 separate tabs (alternative):

    :: timeout n lasts between n-1 and n seconds
    start "C:\Program Files\Internet Explorer\iexplore.exe" "https://www.google.com/"
    timeout 2
    start "C:\Program Files\Internet Explorer\iexplore.exe" "https://www.google.com/"
    timeout 2
    start "C:\Program Files\Internet Explorer\iexplore.exe" "https://www.google.com/"
    

    To open Internet Explorer with 3 separate windows:

    "C:\Program Files\Internet Explorer\iexplore.exe" "https://www.google.com/"
    "C:\Program Files\Internet Explorer\iexplore.exe" "https://www.google.com/"
    "C:\Program Files\Internet Explorer\iexplore.exe" "https://www.google.com/"
    

提交回复
热议问题