Automate Enabling and Disabling IE Proxy settings
When I work from home, I connect to the corporate network over the VPN and need to use the corporate proxy server. When I’m not working, I do not need to go through the proxy. Similarly, when I need to connect to my Wireless router at home, I do not need proxy. It was getting cumbersome each time to manually turn on/off these IE settings. So I decided to automate this.
I knew this could be done through registry scripts. Little bit of googling revealed the appropriate keys to be modified. I exported the appropriate tree from registry editor into .reg file. Removed most of the keys I was not interested in. Created two copies, one to enable and other to disable. Saved them as .reg files. Half of the battle was won.
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] "ProxyEnable"=dword:00000001
Change the ProxyEnable to zero, to disable the proxy.
.reg extension is automatically associated with Registry Editor. But default mode is interactive, which wasn’t too nice. So I went to /s switch for silent. Next create two batch files that call the regedit.exe with /s switch and appropriate .reg file.
This can be further automated by creating shortcuts inside your faviourite application launcher. (Launchy, Slickrun and my favourite DOMercury)
