Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to set up a daily scheduled download of files from an external web-server, using WGET, Windows' task-scheduler and command-scripts.

Since WGET will be run on a server from within the company's internal network, it has to first connect through our HTTP-proxy server, which requires proxy-authentication (HTTP 407), and then when the external web-server is reached, it too also requires authentication (HTTP 401), before the files can be downloaded.

Now this all works, using the following command-line, which unfortunatly contains visible passwords in the command-script:

wget.exe -e http_proxy=http://company-proxy:80
         --proxy-user=PROXYUSER --proxy-password=PROXYPASSWORD 
         --http-user=HTTPUSER --http-password=HTTPPASSWORD

Since the scheduled-task, that is starting WGET (or command-script), has to run as PROXYUSER with PROXYPASSWORD, I was wondering if it is possible to somehow read or give these values to the --proxy.. arguments of WGET, and not having them in plain sight within the command-line/-script?


wget.exe --proxy-user=<Get_User_From_ScheduledTask> 

Or alternatively, from a Windows command-script, is there a way to "programmatically read" values (stored in some kind of registry-database or "vault"), that only the run as user will have access to?

share|improve this question
up vote 1 down vote accepted

i think wgetrc will solve your problem.

look here and here.

share|improve this answer
Hmm yes, I guess an ACL protected wgetrc file, passed as parameter from the scheduled task to WGET, would be the proper solution. – DeckerDK Aug 10 '09 at 11:46

Your Answer


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.