How to force update to proxy setting after changing registry values in batch script?

In a batch script, I am updating a registry value with the REG command to disable the manual proxy.

REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f

However, this does not take effect until I open the proxy settings page in Windows (Start Menu > Change Proxy Settings). All I have to do is open the page and the property gets updated correctly.

Is there any way to reload/update this setting without opening the network settings?


Solution 1:

This link suggests that it cannot be done: https://superuser.com/a/944980/916597.

Unfortunately, there is no easy way. As you’ve noticed, you’re missing the magic “read those settings now” command:

Note that in the link, the answer mentions that there is possibly a way to do it in PowerShell, but that doesn't answer this question. If it interests you, though, go check it out.