Environment: Dell Vostro with Windows 10 10.0.16299

I created two scripts, which toggle between using or not using a specific proxy. The "add" one, sets the value 1 on the ProxyEnable registry key and also sets my proxy address


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

REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /f /v ProxyServer /t REG_SZ /d proxy:8080

set HTTP_PROXY=proxy:8080

The problem is that my browsers doesn't accept those settings unless i manually open the Lan Settings window (a.k.a. inetcpl.cpl). I only open it and do nothing (the settings were set correctly before, by the batch script), and then instantly the proxy works.

I've also checked if the window opening changes anything on the registry, but it doesn't.


For anybody who falls in the same problem, please check this answer from Daniel B. It, along with my .bat, solved my problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.