IE ProxyEnable via registry not working WIN 10

爷,独闯天下 提交于 2019-12-11 12:28:57

问题


How weird is this?

When I enable proxy in Internet Explorer 11 using the registry method, I check my IP and it's not proxied. I click on Internet Options > Lan Settings (nothing else) then my IP changes to the proxy IP.

While the lan settigs window already has Proxy checkbox checked. I don't click "OK" or anything for the changes to take effect, Just by clicking LAN settings the changes take effect as they should. The same is true for Disabling the proxy.

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings] "ProxyEnable"=dword:00000001

This code doesn't work either. It executes fine as RemoteSigned policy but makes no difference.

function refresh-system() {
    $signature = @'
[DllImport("wininet.dll", SetLastError = true, CharSet=CharSet.Auto)]
public static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int dwBufferLength);
'@

    $INTERNET_OPTION_SETTINGS_CHANGED   = 39
    $INTERNET_OPTION_REFRESH            = 37
    $type = Add-Type -MemberDefinition $signature -Name wininet -Namespace pinvoke -PassThru
    $a = $type::InternetSetOption(0, $INTERNET_OPTION_SETTINGS_CHANGED, 0, 0)
    $b = $type::InternetSetOption(0, $INTERNET_OPTION_REFRESH, 0, 0)
    return $a -and $b
}
  • IE 11.1593
  • Automatically detect settings = unchecked
  • Cache disabled = via GPO
  • Windows 10 LTSB 1607
  • No domain = Local user/Workgroup

来源:https://stackoverflow.com/questions/45873492/ie-proxyenable-via-registry-not-working-win-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!