We have laptops that operate on the Domain and VPN in, via a home connection or WiFi on the road. The proxy and firewall always got in the way. So I wrote two scripts a proxy off and a proxy on. You can wrap these in to a script that asks the user how they are connected when they log in or you can create seperate files(proxyon.vbs and proxyoff.vbs) and leave them on the desktop for the user to run as needed.. The code to turn firewall on and off is very similar, but I don't have the code for it readily available.
Proxy on
---------------------------
Const HKEY_CURRENT_USER = &H80000001
strComputer = "."
'This script enables the proxy settings for the currently logged in user.
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings"
strEntryName = "ProxyEnable"
dwValue = 1
objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strEntryName, dwValue
wscript.echo "Proxy now on!"
Proxy off
----------------------------------------
Const HKEY_CURRENT_USER = &H80000001
strComputer = "."
'This script disables the proxy settings for the Currently logged in user.
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings"
strEntryName = "ProxyEnable"
dwValue = 0
objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strEntryName, dwValue
wscript.echo "Proxy now off!"