Temporarily change dns

al4629740
al4629740 used Ask the Experts™
on
Is there a way to change the dns server of a workstation using vb6?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
no idea how you change a registry entry in vb6, but you probably either know or can find out easily or alternatively can spawn a regedit command that does the same.

the registry entry that holds dns servers is :
HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\NameServer

several nameservers can be provided in a space-separated list
Technical Consultant
Commented:
Generally script will update the below registry path for DNS updation,

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces

Go through below Technet link and modify your script according to your requirement.

http://technet.microsoft.com/en-us/library/ee692588.aspx

http://social.technet.microsoft.com/Forums/scriptcenter/en-US/af5cb843-49c0-44d9-8355-d7589fd25ab0/need-a-script-to-change-tcpip-dns-settings-parameters?forum=ITCG

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial