1

I am using IE9 and I'm trying to load two web pages on startup.

Originally it was loading one but now I need to see 2 different pages, preferably tabs but not necessary, whatever is easier.

Here is the original code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<META HTTP-EQUIV="refresh" content="10;URL=http://www.gmail.com">

<title>Loading application...</title>

</head>

<body>
<h1>
PLEASE WAIT...!!!
</h1>
</body>
</html>

and I tried creating a batch file to open 2 different iexplore.exe with 2 different websites but it didn't work. It would only open the 2nd iexplore after the first one was closed.

@echo off

SET BROWSER=iexplore.exe
START %BROWSER% "http://www.cnn.com"
SLEEP 10
START %BROWSER% "http://www.gmail.com"

NOTE: I need a 10 second delay to open gmail.com (or one of the sites). That's where I'm getting stuck, otherwise I would just set the home pages to these two and add a shortcut to iexplore.exe to the startup folder.

Any help is greatly appreciated!

randomizertech
  • 2,309
  • 15
  • 48
  • 85
  • This works fine for me on Windows 7 32 bit. Change iexplorer to iexplore in your script above. You typed it wrong. Better to copy and paste your script. – Matt Williamson May 16 '13 at 14:18
  • @MattWilliamson I have it on another computer, that's why hehe. I modified it and yes it work but the second page does not take 10 seconds to load. It does it at the same time – randomizertech May 16 '13 at 14:27

2 Answers2

0
SET BROWSER=iexplore.exe
START /w %BROWSER% "http://www.cnn.com"
SLEEP 10
START %BROWSER% "http://www.gmail.com"

START /W to wait for finishing the execution.And internet explorer exe is named iexplore.exe.

npocmaka
  • 55,367
  • 18
  • 148
  • 187
0

If you want to open the second page in a new tab, IE has to be your default browser. The following works for me. I don't have sleep, so I substituted the ping for it.

@echo off
setlocal
SET BROWSER=iexplore.exe
START %BROWSER% "http://www.cnn.com"
ping -n 10 localhost>nul
START "" "http://www.gmail.com"
Matt Williamson
  • 6,947
  • 1
  • 23
  • 36