?
Solved

Creating a VB script for pointing a computer to a proxy server

Posted on 2006-11-29
1
Medium Priority
?
190 Views
Last Modified: 2010-04-23
Hi guys,

Forgive my lack of knowledge but I don't have an in depth knowledge of VB. I want to create a VB script which will allow me to point a computer to a proxy server based on its subnet. How might I go about creating this?

Thanks very much for your time,

Kind regards,

PK
0
Comment
Question by:keenanpatrick
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 9

Accepted Solution

by:
DjDezmond earned 2000 total points
ID: 18037341
Make a new text document, and paste the following code:

'------------------------------------------------------------------------------'
Set oShell = CreateObject("Wscript.Shell")
RegKeyPath = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\"
oShell.RegWrite RegKeyPath & "ProxyServer", WScript.Arguments.Item(0), "REG_SZ"
oShell.RegWrite RegKeyPath & "ProxyEnable", "1", "REG_DWORD"
'------------------------------------------------------------------------------'

Rename the txt file to a .vbs file. You can normally double click it to run, but in this case, you will have to run it as a command line...

Eg...
  SetProxyPath.vbs "www.MyNewProxy.com"

It will set that path as the proxy server, and enable the proxy setting.

Hope this is what you wanted
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question