windows 如何为本地系统帐户配置 IE 代理?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4250887/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to configure IE proxying for the local system account?
提问by Andrew Swan
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:
我有一个需要使用某些代理设置(例如主机名和端口)启动 IE 的 Windows 服务。如果该服务被配置为作为某个普通用户(例如我)运行,我可以通过在“HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings”注册表项中以编程方式设置以下值来确保所需的 IE 代理配置:
- ProxyServer = myserver:9999
- ProxyEnable = 0x1
- ProxyOverride = (delete)
- 代理服务器 = 我的服务器:9999
- 代理启用 = 0x1
- ProxyOverride = (删除)
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.
但是,如果该服务配置为使用本地系统帐户登录,则设置这些注册表值似乎对 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.
是否有编程方式为本地系统帐户配置 IE 代理?理想情况下,我想要一种既适用于该帐户又适用于普通用户的方法,以保持我的程序简单。
In case you're wondering why a service needs to start a browser, the program being run as a service is the Hudsoncontinuous integration server, which in turn is configured to run some browser-based automated acceptance tests of a web application (using Sahi).
如果您想知道为什么服务需要启动浏览器,作为服务运行的程序是Hudson持续集成服务器,它反过来被配置为运行一些基于浏览器的 Web 应用程序自动化验收测试(使用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.
停止新闻:自从添加赏金后,我发现这是https://serverfault.com/questions/34940/how-do-i-configure-proxy-settings-for-local-system的完全重复,它有一个被接受的答案,所以赏金不再适用。我(或管理员)可以删除赏金并取回我的代表吗?此外,似乎不可能将 StackOverflow 问题作为 ServerFault 问题的副本来关闭。
采纳答案by Andrew Swan
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.
这是https://serverfault.com/questions/34940/how-do-i-configure-proxy-settings-for-local-system的完全重复,它有一个公认的答案。