I use a proxy when visiting a specific website, but I'd like the proxy to be toggled off everywhere else on the internet. In order to turn the proxy on or off in Chrome, I need to go to to chrome options, change proxy settings, then LAN settings, then disable/enable the proxy, then click OK a bunch to leave all of the menus. It gets old.
I did find a nice little visualbasic script to toggle the setting, and it does change the setting correctly, but Chrome doesn't recognize the change (even if I restart the browser) unless I manually go back to that proxy screen and then OK through all of them. Is there some sort of "recheck internet settings" event that happens in Chrome when I go through the menus? Can this be replicated somehow, or is there a cleaner one-click method for toggling the "use a proxy" setting than the one I'm using?
odd question, I know. Thanks in advance for any help. Here's the VB script in case anyone wants to see it.
Code:Const HKEY_CURRENT_USER = &H80000001 strComputer = "." Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv") strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" strValueName = "ProxyEnable" objRegistry.GetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName, dwValue if dwValue=0 then dwValue=1 else dwValue=0 end if objRegistry.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName, dwValue if dwValue=1 then msg="Proxy Enabled" else msg="Proxy Disabled" end if msgbox msg,64,"Proxy Toggle"


LinkBack URL
About LinkBacks



Reply With Quote