Monday, October 1, 2007

VBScript - Internet Explorer - Proxy settings

'Script Start

On Error Resume Next
strComputer = "."

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Proxy")

Const HKEY_CURRENT_USER = &H80000001
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings"
strValueName = "ProxyEnable"
dim dWord
objRegistry.GetDWORDValue HKEY_CURRENT_USER , strKeyPath , strValueName ,dWord
if dWord = 1 then
dwValue = 0
objRegistry.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName, dwValue
For Each objItem in colItems
dwValue = 1
objRegistry.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName, dwValue
objItem.SetProxySetting "HOME","8080" 'Change parameters here
end if

'Script End
Got from website
How to execute a VBScript
Please post suggestions to improve this blog.
You can reach me at

1 comment:

Anonymous said...

Reading these kind of posts reminds me of just how technology truly is ubiquitous in this day and age, and I think it is safe to say that we have passed the point of no return in our relationship with technology.

I don't mean this in a bad way, of course! Ethical concerns aside... I just hope that as technology further develops, the possibility of downloading our memories onto a digital medium becomes a true reality. It's one of the things I really wish I could encounter in my lifetime.

(Posted on Nintendo DS running [url=]R4i SDHC[/url] DS rrPost)