Solved

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

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.net and sql server 4 55
Generate Numbers in JQuery file 11 72
Visual studio 2015 1 36
Need syntax help building hyperlink 2 42
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 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