It is a very common task to set and clear the proxy setting depending on the client's network configuration.
I was frustrated going through Tools-->Internet options-->Connections tab-->LAN settings and configuring the proxy settings so I ended up having a couple of batch scripts that set the client's proxy and one to reset the settings when I am in a more relaxed environment where traffic passes through the normal gateway... Note that I have created shortcuts and set them to "Run as administrator" as the following commands require elevation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@REM Works on vista+ | |
@REM Set proxy | |
netsh winhttp set proxy 127.0.0.1:8080 | |
@REM Remove proxy | |
netsh winhttp reset proxy |