Opening web page using dos

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
Jess Selien
Posts: 13
Joined: 26 Sep 2012 12:08

Re: Opening web page using dos

#16 Post by Jess Selien » 03 Jul 2013 15:05

IE 8 - windows command batch script....

Note - url1= full path. Do not put quotes around if at all possible.
Placing quotes around the url path seems to confuse things.

Note - Error message "Access Denied" could show up with the ping command as running a script via a batch script could have a group policy or block on running as an admin. In the below format going to >NUL it seems to work ok for myself.

Note - Error message "cannot find directory" is related to the /d flag. Make sure the path to internet explorer is set right in the path or you can manually setup its physical path using /d"C:\%path%\" iexplore.exe url1

Note - Some machines may be able to have a smaller ping time then provided below. The wait command does not seem to work to get multiple tabs.

ping localhost -n 6 -w 3000>NUL
rem start iexplore.exe url1
start iexplore.exe
ping localhost -n 2 -w 3000>NUL
start /d iexplore.exe url2
ping localhost -n 2 -w 3000>NUL
start /d iexplore.exe url3
ping localhost -n 2 -w 3000>NUL
start /d iexplore.exe url4
etc

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Opening web page using dos

#17 Post by Squashman » 03 Jul 2013 16:05

Is there a reason you dug up this old thread? I am not seeing the point of your post.

Jess Selien
Posts: 13
Joined: 26 Sep 2012 12:08

Re: Opening web page using dos

#18 Post by Jess Selien » 28 Aug 2013 16:16

Reasons...
Tabs are still relatively new
Folks may still want to know how to automate the process.
Automation is awesome.
Dos tips is a great research tool for search engine lookup how to...

Add on...
If your starting multiple processes at once, then this dos batch code to open up multiple ie windows at the same time can be interupted.
Use the wait command at the begin or end to separate and make sure it is the only code running at the time of opening all the tab windows.

Example...
start iexplore.exe path1
ping localhost -n 3 -w 9000>NUL
start /d start /d iexplore.exe path2
wait 10

Post Reply