Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using VBscript to update proxy settings

Status
Not open for further replies.

christianeOU

Technical User
Jul 10, 2003
1
0
0
US
I need more information on how to get VBscript ran off of a logon script to check the proxy settings, then if they are not correct to change them. In addition to this problem I have a server side script that is suppose to delete all printers on a client machine, then go back and install only the printers that are used in that building, however when this script is ran from the server it modifies the server not the client. I am very much a noob when it comes to VBscripting in this manner so any help would be greatly appreciated.
 
I just use this code below and add it to the startup folder (which I have redirected). Obviously you need to change it to suit your enviroment.Where you have the <local> setting you can add sites by using a semi colon between each site you wish to ignore.ie &quot;<local>;
on error resume next

Set objShell = CreateObject(&quot;WScript.Shell&quot;)

prefix = _
&quot;HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\&quot;
objShell.regWrite prefix & &quot;ProxyServer&quot;, &quot;10.240.2.51:8080&quot;
objShell.regWrite prefix & &quot;ProxyOverride&quot;, &quot;<local>&quot;
objShell.regWrite prefix & &quot;ProxyEnable&quot;, &quot;1&quot;

You may wnat to check this app out it allows you to change registry setting quite easily across multiple machines remotely.
 
Sorry dont add the semi colon at the end of the sites to ignore..
Am i missing something? Is there no way to edit your post?
 
I'm having a v similar problem and found this thread very useful, however I can't work out how to &quot;check&quot; the bypass proxy server for local addresses from within the vbscript... Can anyone help?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top