Solved

is there a script to change dns settings in vb6

Posted on 2014-04-21
5
440 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

809 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