I want to startup iexplore once an hour pointed at a specific url to kick off some processing. It's a Windows 2003 server with Internet Explorer 7 running in enhanced security configuration.
The scheduled task is set to not require the user to be logged in to kick this task off.
When I am logged in I can see the iexplore window popup and disappear again and I know it has accessed my url (I've set it so I get an email).
When I am not logged in I do not get anything triggered from my url - but when I look at the Scheduled Log it says the task ran the program OK with an exit code of 0. I can only therefore assume that iexplore pops up - but does not go to the required url.
Is this something to do with IE's 'enhanced security configuration'?
What do I need to do to get it to open IE and actually go to my url?
Clarification: The url points to a .aspx page - so I'd want something that can start up a web page and not fall over when the .aspx page tries to access sesson info.
I'm wondering why would you want to launch such a behemoth just to access a URL?
Nevermind...
Here are some things that can help:
Those are all command line utilities that can make your life easier.
Do you really need a full fledged browser to hit this URL? Or do you just need something that speaks basic http? If it's the latter, you should try using something like cURL. From their website:
Basically, it should bypass any weird issues trying to run IE as a scheduled task. It's also a lot smaller and more efficient for this task because it doesn't actually render the response from the server (though you can save/process the raw html if you want).
I would guess it is related to this issue: Scheduled Tasks w/ GUI issue
Certain GUI elements are unavailable when the user is not logged in. If you just need to access a URL to set off some server side scripting you could use cURL for windows: http://curl.haxx.se/download.html
I can't say I've tried to do what you're doing on Windows Server.
If you're just looking at making an HTTP request and throwing away the results you may want to look at using a Win32 port of GNU wget rather than Internet Explorer.
To answer the question, just pass the URL on the cmd line:
Set the "start in" directory to
c:\program files\internet explorer
.However, you can't non-interactively close the browser. The old javascript tricks don't work with newer IE versions. I think cURL is a better way to go and accomplishes the same task.
I'm looking for an even better way to do this than I'm using right now. Currently I'm using a simple .vbs script to achieve this.
In your scheduled task, call the "wscript.exe" program, and specify the full absolute path to the .vbs file as the argument.