Solved

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

Posted on 2006-11-29
1
187 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 500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

707 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