All Forums >> [Scripting] >> Post a VBScript >> yet another proxy_config.vbs Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
As you may or may not be aware, you must configure the proxy settings for each user on a windows domain. The following script will configure the gateway as the proxy for each user that runs it. Since our organization uses linux based VPN routers with Squid web proxy to do content filtering, and access control, the gateway is always the proxy. We use the 172.x.x.x private range, so Im not 100% certain of the performance of this under other private net ranges.
On a side note, someone will probably mention that there's a way to retrieve the gateway with WMI, and they would be correct. The problem I've encountered with using WMI is that, sometimes, I get back information about the wrong network card on computers with more than one network card (especially our wireless tablets running windows XP tablet edition). The scripts that I have which use WMI, I still use a function similar to GrabGateway [GrabIP in my other scripts] as a fall-back if I get a 169.x.x.x IP.
If you are confused about what this script is doing, simply set DebugMode = true at the top of the script, and you'll get plenty of information out of it.
This script was written entirely in Notepad++, with tabstops set to 2.
I have over 40 offices. That means 40 different subnets. And to top that off, many of my users go from one office to another. A nice script that is applied at the top level via GPO was the simplest way to manage affairs. :)
-Bigwill
< Message edited by bigwill -- 2/28/2007 9:37:18 AM >