Search code examples
windowsinternet-explorerwindows-servicesregistrylocalsystem

How to configure IE proxying for the local system account?


See Server Fault: How do I configure proxy settings for LOCAL SYSTEM?

I have a Windows service that needs to start up IE with certain proxy settings (e.g. host name and port). If the service is configured to run as some normal user (e.g. me), I can ensure the required IE proxy configuration by programmatically setting the following values in the "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" registry key:

  • ProxyServer = myserver:9999
  • ProxyEnable = 0x1
  • ProxyOverride = (delete)

However if the service is configured to log on using the local system account, setting those registry values seems to have no effect on IE.

Is there a programmatic way to configure IE proxying for the local system account? Ideally I'd like a method that works both for that account and for normal users, to keep my program simple.

In case you're wondering why a service needs to start a browser, the program being run as a service is the Hudson continuous integration server, which in turn is configured to run some browser-based automated acceptance tests of a web application (using Sahi).

STOP PRESS: Since adding the bounty, I've discovered this is an exact duplicate of https://serverfault.com/questions/34940/how-do-i-configure-proxy-settings-for-local-system, which has an accepted answer, so a bounty is no longer applicable. Can I (or an admin) delete the bounty and get my rep back? Also, it doesn't seem possible to close a StackOverflow question as being a duplicate of a ServerFault question.


Solution

  • This is an exact duplicate of https://serverfault.com/questions/34940/how-do-i-configure-proxy-settings-for-local-system, which has an accepted answer.