Solved

is there a script to change dns settings in vb6

Posted on 2014-04-21
5
453 Views
Last Modified: 2014-04-27
I would like to use a script to change the dns server settings of a windows computer.  Does anyone know how I can do this using vb6?
0
Comment
Question by:al4629740
[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
  • 3
  • 2
5 Comments
 
LVL 5

Expert Comment

by:advfinance
ID: 40017055
You can use netsh to change DNS settings.

For example, to add a DNS server to the "Local Area Connection" interface.

netsh interface ip add dns "Local Area Connection" 194.168.4.100

Open in new window

0
 

Author Comment

by:al4629740
ID: 40019132
Can I run this script from vb6?
0
 
LVL 5

Accepted Solution

by:
advfinance earned 500 total points
ID: 40019554
You could shell it.

Shell "netsh interface ip add dns ""Local Area Connection"" 194.168.4.100"

Open in new window


--
Chris
0
 

Author Comment

by:al4629740
ID: 40020466
It needs to be done in vb6 through an app.  After they uninstall the app, it will need to reset the settings back to original.
0
 
LVL 5

Expert Comment

by:advfinance
ID: 40020562
Call it from your installer?

--
Chris
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

738 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