script to start IE, then kill it?

black_b[ ]x

[H]ard|Gawd
Joined
Jul 1, 2002
Messages
1,753
I'm trying to determine the WAN address on our router at work, which is dynamic. I figured I could just have the server access a page on our website every few hours, where the IP address would be logged. I don't see how to kill the IE process once its been started though. I don't want to log in and find 30 IE windows open. i found and modified a VBS script that will kill the window based on its title, but the batch file that calls it is waiting for the IE window to finish. How do I start the IE task in the background and continue the batch file? I added a sleep to the VBS script so it should have time to start up.
 
put this in a page on the server to test: <script>window.opener=self; window.close()</script>

and

something like this in your batch file: start /wait iexplore "http://www.myserver.com/testpage.html"

i have a handy sleep.exe file that sleeps for x number of seconds.

A simple batch file like this would do what you want every 2 hours under windows:

:loop
sleep 7200
start /wait iexplore "http://www.myserver.com/testpage.html"
goto :loop
 
Back
Top