Truemag

  • Categories
    • Tips And Tricks
    • Internet
    • PHP
    • Javascript
    • CSharp
    • SQL Server
    • Linux
  • Lastest Videos
  • Our Demos
  • About
  • Contact
  • Home
  • Write With Us
  • Job Request
Home Internet IE Enable/Disable Proxy Server by using script file

IE Enable/Disable Proxy Server by using script file

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

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

ProxyEnable in Registry Editor

ProxyEnable in Registry Editor

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 :

IE Proxy Server is enabling

IE Proxy Server is enabling

Perform running script to disable Proxy Server by double click on this script. Choose button “No” to disbale Proxy Server.

Run script to disable Proxy Server

Run script to disable Proxy Server

IE Proxy Server after running script, Proxy Server is changed to “Disable” status.

IE Proxy Server disabled after run script

IE Proxy Server disabled after run script

To enable Proxy Server again, run script and choose button “Yes”

Run script to  enable Proxy Server

Run script to enable Proxy Server

Hope it useful for you, I will do research about setting Firefox. Maybe the setting is similar way.:)

Download Script file above

Feb 17, 2012quynhnguyen
MSSQL Create Database With SQL StatementBack Up FTP Sites In FileZilla Client
You Might Also Like:
  • Fix Can Not Connect To Proxy Server In Firefox, Google Chrome And Internet Explorer
  • Enable Facebook Timeline Rapidly
  • How To Enable Telnet Command In Windows 7 And Server 2008
  • Accessing Websites Via Another Country Internet Connection
  • Internet Explorer 9 Has Modified This Page To Prevent Cross-Site Scripting
  • Firefox How to enable Saved Tabs before closing
  • Disable Pingbacks and Trackbacks In WordPress
  • Browsers Take Long Time To Load Websites
  • Manage MacBook Hosts File Easier With Hosts Widget
  • Disable Auto Save Password In HTML Form Or TextBox
quynhnguyen
9 years ago Internet, Tips And TricksFirefox, GoogleChrome, IE, Registry981
0
GooglePlus
0
Facebook
0
Twitter
0
Digg
0
Delicious
0
Stumbleupon
0
Linkedin
0
Pinterest
Most Viewed
PHP Download Image Or File From URL
21,956 views
Notepad Plus Plus Compare Plugin
How To Install Compare Text Plugin In Notepad Plus Plus
19,804 views
Microsoft SQL Server 2008 Attach Remove Log
Delete, Shrink, Eliminate Transaction Log .LDF File
15,629 views
JQuery Allow only numeric characters or only alphabet characters in textbox
13,136 views
C# Read Json From URL And Parse/Deserialize Json
9,595 views
4 Rapid Development is a central page that is targeted at newbie and professional programmers, database administrators, system admin, web masters and bloggers.
Recent Posts
  • Essay Writers
  • College Essay Writers – The Way to Earn Your Essay in Demand
  • Buy Research Papers – How to See Them at a Bargain Price
  • How to Write a Research Paper For Sale
  • Essay Writing – Some Useful Suggestions for Writing Urgent Essays
Categories
  • CSharp (45)
  • Facebook Graph API (19)
  • Google API (7)
  • Internet (87)
  • iPhone XCode (8)
  • Javascript (35)
  • Linux (28)
  • MySQL (16)
  • PHP (84)
  • Problem Issue Error (29)
  • Resources (32)
  • SQL Server (25)
  • Timeline (5)
  • Tips And Tricks (141)
  • Uncategorized (69)
Recommended
  • Custom Software Development Company
  • Online Useful Tools
  • Premium Themes
  • VPS
2014 © 4 Rapid Development