I want to make a simple Windows desktop widget to turn on and off the internet proxy.
What is the simpler way?
In Windows 10 it seams that after execute the script you need to open proxy settings window for changes to take effect. So add the following lines:
proxy_off.bat
echo off
cls
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
change_shortcut_on
start /min ms-settings:network-proxy
taskkill /IM SystemSettings.exe /f
exit
proxy_on.bat
echo off
cls
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
change_shortcut_off
start /min ms-settings:network-proxy
taskkill /IM SystemSettings.exe /f
exit
ATM the setting window don`t start minimized.