Script to Set a Proxy Server

This VBScript will set a user’s proxy on a Windows XP workstation. This is great for login scripts. The script will enable the proxy, set the proxy server, and add servers to the bypass proxy list. You can easily add other settings to this list.

Option Explicit

' Set variables
Dim sHKCUProxyServer, sHKCUProxyOverride, sHKCUProxyEnable, WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")

sHKCUProxyEnable = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable"
sHKCUProxyServer = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer"
sHKCUProxyOverride = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyOverride"

WshShell.RegWrite sHKCUProxyEnable,"1","REG_DWORD"
WshShell.RegWrite sHKCUProxyServer,"proxy-server:3328","REG_SZ"
WshShell.RegWrite sHKCUProxyOverride,"http://intranet;http://local-server;","REG_SZ"

There are quite a few settings to IE, search Microsoft for the rest.

Leave a Reply