Larry Brister
asked on
WinServer 2003
I need to set up a scheduled task that will open a internet explorer (in IE7) url at a specific time and close it automatically 2 minutes later.
ASKER
jcoehoorn,
Is this a vb script I open?
Is this a vb script I open?
No. Since the question is in the VS.Net and .Net Editors zones it's VB.Net code, and requires the .Net framework. Here's a more complete listing. Just create a new console app, replace the contents of the default Module1.vb file with this (with your desired url in the appropriate place), build it, and schedule the created .exe file for your desired time:
Module Main
Sub Main()
Dim p As Process = Process.Start("http://www.google.com")
If Not p.WaitForExit(120000) Then p.Kill()
End Sub
End Module
ASKER
jcoehoorn:
Ahhhhhhhh.....
Thanks. I'll do that. I'm a web developer and din't think about where the answer was coming from.
Ahhhhhhhh.....
Thanks. I'll do that. I'm a web developer and din't think about where the answer was coming from.
ASKER
jcoehorn,
The application(s) opened but errored on the close part.
Error message attached...
The application(s) opened but errored on the close part.
Error message attached...
EventType clr20r3, P1 pages.exe, P2 1.0.0.0, P3 47b1f8d1, P4 pages, P5 1.0.0.0, P6 47b1f8d1, P7 11, P8 c, P9 system.nullreferenceexception, P10 NIL.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great job. Thanks
Open in new window