Results 1 to 3 of 3

Thread: Programmatically edit DNS in Visual Basic 6

  1. #1

    Thread Starter
    New Member gdcats's Avatar
    Join Date
    Sep 2007
    Location
    Dubai UAE
    Posts
    5

    Programmatically edit DNS in Visual Basic 6

    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.
    Last edited by gdcats; Nov 11th, 2007 at 04:14 AM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Programmatically edit DNS in Visual Basic 6

    What error does it generate?

    Did you do a formal install on the other machine or just copy your program?

  3. #3

    Thread Starter
    New Member gdcats's Avatar
    Join Date
    Sep 2007
    Location
    Dubai UAE
    Posts
    5

    Re: Programmatically edit DNS in Visual Basic 6

    Sir Hack,
    My initial post seems complicated, my aim actually is to DISABLE the DNS on the TCP/IP (see screen shot):
    [IMG]C:\Documents and Settings\gcatulay\Desktop\DNS.jpg[/IMG]

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width