Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have seen similar threads here and on the net, but I think my question is slightly different than what I can find...

I have a script that runs perfectly when logged in with a service account I created specifically to run this script. But when I schedule it to run it hangs when trying to launch IE (the first part of my script). Without being logged in with that account I can watch the processes with task manager and see the processes running, but the script never finishes.

I want to be able to run this script without needing to be logged in at all or even have the account be locked all the times. Is this possible? Or do I have to have the user account logged in?

Any help would be greatly appreciated!

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

You will not be able to start IE without logged in user. Pls, provide more information why you need to start IE at all, and maybe we'll be able to come with another solution.

If your task is to download something from somewhere, investigate using curl and wget. Both of these programs are ported to windows and provide powerful options to provide a username and passwords, create headers, etc. I would say that curl is the way to go, as it's specifically written with scripting in mind.

share|improve this answer
    
Unfortunately there is no way around this. My script logs into a webpage to download a report and then the script runs a macro on said report. So I have to login with some Internet Browser to do this and IE works best for me cause my scripting language (AutoIT) has built in functions for IE. Is there anyway to safely keep an account logged in? Or do I just need a strong password? –  Webs Mar 2 '10 at 21:32
    
I have edited my answer to reflect your new info. Please, edit your question with it, so it's more useful for others to search and find. –  Sunny Mar 2 '10 at 21:42
add comment

I would recommend rewriting the script in a language where you can access websites without automating a browser - for example in Perl there is WWW::Mechanize, and you can do similar things in PowerShell using HttpWebRequest.

share|improve this answer
    
I haven't thought about using httpwebrequests... I'm just not sure because of how specific of a thing I am working with that it would help. I think I'll just look into using an autologin account or something, or I will just login and click a button to run the script. Thanks everyone for your help! –  Webs Mar 3 '10 at 4:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.