windows 如何通过命令行设置“自动检测设置”代理?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7874469/
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 Set "Automatically Detect settings" Proxy thru command line?
提问by Sathish
I am trying to set "automatically detect settings" using netsh winhttp command. But I could not find a way to set it.
我正在尝试使用 netsh winhttp 命令设置“自动检测设置”。但我找不到设置它的方法。
回答by Seaner992
You can do it with this:
你可以这样做:
To Enable 'Automatically Detect Settings'
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoDetect /t REG_DWORD /d 1 /f
To Disable 'Automatically Detect Settings'
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoDetect /t REG_DWORD /d 0 /f
启用“自动检测设置”
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoDetect /t REG_DWORD /d 1 /f
禁用“自动检测设置”
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoDetect /t REG_DWORD /d 0 /f
回答by weberik
AFAIK there is no global "automatically detect settings" neither a netsh command for this. the setting is specific to a browser. i.e. the internet explorer is configured using reg keys. see the following examples: http://support.microsoft.com/kb/819961
AFAIK 没有全局“自动检测设置”,也没有用于此的 netsh 命令。该设置特定于浏览器。即使用 reg 键配置 Internet Explorer。请参阅以下示例:http: //support.microsoft.com/kb/819961
once you know the right regkey you can use the reg command to set it.
一旦您知道正确的 regkey,您就可以使用 reg 命令来设置它。