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?

1 Answer 1


i think wgetrc will solve your problem.

look here and here.

  • 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, 2009 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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