This article shows you the way of using script file written by Window Script to enable or disable Proxy Server in Internet Explorer.
I am in the situation like that. I have a laptop, when I use it to work in my company,I have to configure proxy server to access internet following company policy. After work, I go home,do something…an then usually using my laptop to surf internet for relaxing, but my Internet connection does need to use proxy, so I have to change, that makes me feel a a little bit inconvenience
You can refer this article witten by Mr Hoan named Fix Can Not Connect To Proxy Server In Firefox, Google Chrome And Internet Explorer to configure IE proxy server in wizard.
Now, I would like to give you the another way to configure Proxy Server.
Enable/Disable Proxy Server by using window scripting
I wrote a script as below
Option Explicit Dim objShell, regProxyEnable, retMsg regProxyEnable = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable" Set objShell = WScript.CreateObject("WScript.Shell") On Error Resume Next retMsg = MsgBox("Please select option :(Yes : Enable, No : Disable , Cancel : Do nothing)", _ vbYesNoCancel, "Enable/Disable proxy server") 'Setvalue of ProxyEnable in registry(1 : enable, 0 : disable) If retMsg = vbYes Then 'Enable objShell.RegWrite regProxyEnable, "1", "REG_DWORD" MsgBox "Proxy is enabled!" WScript.Quit ElseIf retMsg = vbNo Then ' Disable objShell.RegWrite regProxyEnable, "0", "REG_DWORD" MsgBox "Proxy is disabled!" WScript.Quit End If
The main purpose of block code is using Window Script to set value of “ProxyEnable” in Registry.(0 : disable and 1 : enable)
The path is as below image
Enjoy this script in Window 7, IE 8 which I am using
I attached a script named “IE_EnableOrDisableProxySetting.vbs” at the bottom of this article. You can download and place it on desktop to be easy running.
***Note*** : Please remember to close IE before running this script.
IE before running script :
Perform running script to disable Proxy Server by double click on this script. Choose button “No” to disbale Proxy Server.
IE Proxy Server after running script, Proxy Server is changed to “Disable” status.
To enable Proxy Server again, run script and choose button “Yes”
Hope it useful for you, I will do research about setting Firefox. Maybe the setting is similar way.:)