Some of you may have the common moan from users that when they are at home their internet doesn’t work on their corporate laptop.
They tell you they’ve connected to their wireless without issue but IE won’t work!
Straight away you ask “Have you turned off your Proxy?”, then they blankly stare at you!
So…. The solution is to make a VB script such as the below to turn it off and on depending whether they are sat in work or at home:
Note: The script enables or disables the proxy via the registry so the user needs access to their registry!!
Turn the proxy on (for work):
Set WshShell = WScript.CreateObject("WScript.Shell") On Error Resume Next WshShell.RegWrite "HKCU\Software\Microsoft\Windows\" & _ "CurrentVersion\Internet Settings\ProxyEnable", _ 1, "REG_DWORD" wShshell.Run "taskkill /im iexplore.exe",0,True Set wShshell = Nothing Mybox = MsgBox("Proxy is now Enabled" ,vbOkOnly,"Proxy Enabled")
Turn the proxy off (for home):
Set WshShell = WScript.CreateObject("WScript.Shell") On Error Resume Next WshShell.RegWrite "HKCU\Software\Microsoft\Windows\" & _ "CurrentVersion\Internet Settings\ProxyEnable", _ 0, "REG_DWORD" wShshell.Run "taskkill /im iexplore.exe",0,True Set wShshell = Nothing Mybox = MsgBox("Proxy is now disabled" ,vbOkOnly,"Proxy Disabled")
Leave a Reply