Batch / BAT - change proxy settings using a package / BAT file

Can someone teach me how to change proxy settings using a .bat file or suggestion? Honestly, I can not find good information.

I need a .bat file that will change my Internet settings (Proxy) with a specific proxy server and port.

thanks

+8
source share
2 answers

The proxy settings for Internet Explorer are stored in the registry in the folder " Software\Microsoft\Windows\CurrentVersion\Internet Settings .

With Powershell (part of Windows since Windows 7) you can use:

set-itemproperty -path "hkcu:Software\Microsoft\Windows\CurrentVersion\Internet Settings" -name ProxyServer -value "http=proxy-url:port;https=proxy-url:port;ftp=proxy-url:port;socks=proxy-url:port;" -type string

This setting only affects Internet Explorer and may require a new tab or even restart IE, although this is unlikely.

+9
source

Another option, if you do not want to install Powershell, is to use the REG.exe command.

So, in this case, you should add to your batch script:

REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings"/v ProxyServer/d "http=proxy-url:port;https=proxy-url:port;ftp=proxy-url:port;socks=proxy-url:port;"/t REG_SZ/f

For information, Internet Explorer proxy settings are also used by Google Chrome.

+5
source

All Articles