Windows DatabaseebooksStatistical Information

LWE10082 : Howto set a proxy via registry in windows

Symptom:

You need to set some registry settings for a proxy under windows. You want to do it via a logon script.

Cause:

None

Solution:

You can write a few lines of vbscript which can set the settings or import a certain registry file.

The registry file should look a bit like the following. Please note, this is an example and has to be changed for your environment.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyServer"="Theproxy:8080"
"ProxyOverride"="Lubbyserver;mailhost;10.47.*;http://Somesite*;10.46.*;10.65.*;<local>"
"ProxyEnable"=dword:00000001

To load via a vbscript you can insert something like:

Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell") 

WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer", "Theproxy:8080", "REG_SZ"
WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 1, "REG_DWORD"
 


Disclaimer:

The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!
Copyright © 2004-2011 Lubby (V3.0.10 Aug 2011)
Sponsored by Keskon.
Statistical information by Google Analytics