Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-11-29
1
Medium Priority
?
191 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

618 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