Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

is there a script to change dns settings in vb6

Posted on 2014-04-21
5
Medium Priority
?
478 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 1500 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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

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.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

916 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