Solved

is there a script to change dns settings in vb6

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now