Click to See Complete Forum and Search --> : Programmatically edit DNS in Visual Basic 6
gdcats
Nov 11th, 2007, 03:06 AM
Help guys, a code to programmatically alter (remove,insert) the DNS entries in TCP/IP. I made it work using the Registry but works only on my machine :( (ex. WshShell.regwrite "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters\Interfaces\{2FA7197E-C071-46B3-A75B-FAC5CDC49580}\NameServer", "192.168.1.1,192.100.112.10", "REG_SZ"), if I run the code on another machine it generates an error.
Any other alternative?
THanks in advance.:)
Hack
Nov 12th, 2007, 07:05 AM
What error does it generate?
Did you do a formal install on the other machine or just copy your program?
gdcats
Nov 13th, 2007, 12:00 AM
Sir Hack,
My initial post seems complicated, my aim actually is to DISABLE the DNS on the TCP/IP (see screen shot):
C:\Documents and Settings\gcatulay\Desktop\DNS.jpg
if I could just find the entry in the Registry to switch it off. I'm redirecting all client internet connection to a proxy server (WinGate) and I'm doing this without touching the clients' machine (run the code to disable DNS when a user logs in to domain).
Thanks in advance.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.