I've had a look for some sort of program or other script to change proxy settings in IE but can't find anything to do exactly what I want.
So far I've got:
Option Explicit
Dim objShell
Dim strProxyenable, strProxy
strProxyenable = "HKCU\Software\Microsoft\Windows\CurrentVersion\In ternet Settings\ProxyEnable"
strProxy = "HKCU\Software\Microsoft\Windows\CurrentVersion\In ternet Settings\ProxyServer"
Set objShell = CreateObject("WScript.Shell")
strProxyenable = objShell.RegRead(strPRoxyenable)
If strProxyenable = 1 then
'Turn it off
objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\In ternet Settings\ProxyEnable","0","REG_DWORD"
objShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\In ternet Settings\ProxyServer"
objshell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\In ternet Settings\ProxyOverride"
Wscript.Echo "Proxy Disabled"
WScript.Quit
else
'Turn it on
objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\In ternet Settings\ProxyEnable","1","REG_DWORD"
objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\In ternet Settings\ProxyServer","address_here:1080","REG_SZ"
objshell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\In ternet Settings\ProxyOverride","*.wayland.local;10.104.64 .*;10.104.65.*;server03;wserver01","REG_SZ"
Wscript.Echo "Proxy Enabled"
wscript.quit
end if
Which works but it doesn't check the box labelled "Bypass proxy server for local addresses"
Ben



LinkBack URL
About LinkBacks

Reply With Quote






