There is actually a much easier way to do this using the BITSAdmin tool from Windows.
This tool allows you to change the proxy settings for
- LOCALSYSTEM
- NETWORKSERVICE
- LOCALSERVICE
Quick examples:
Static proxy for LOCALSYSTEM:
bitsadmin /util /setieproxy localsystem MANUAL_PROXY http://myproxy.mydomain.com:8080
Static proxy for NETWORKSERVICE that bypasses local addresses:
bitsadmin /util /setieproxy networkservice MANUAL_PROXY http://my.proxy.com "<local>
Set a proxy.pac for LOCALSERVICE:
bitsadmin /util /setieproxy localservice AUTOSCRIPT http://myproxy.mydomain.com/proxy.pac.js
Remove all proxy settings for LOCALSYSTEM:
bitsadmin /util /setieproxy localsystem RESET
full details are on MSDN Library
Thanks !
ReplyDelete