[python-win32] Getting IP of DNS server

Jorgensen, Jens jens.jorgensen@tallan.com
Mon, 24 Sep 2001 13:21:39 -0500


The information is there in the registry, under 
HKLM\SYSTEM\CurrentControlSet\Service\Tcpip\Parameters\Interfaces\<guid 
for specific interface>\DhcpNameServer. This is in Win2K and using DHCP 
so it probably won't work in other OS version (eg. NT 4) or if you 
aren't using DHCP. Might I recommend to you my pyRegistry module for 
Win32 registry access. It's object-oriented and has a couple cool 
features. Check it out at http://www.ultraemail.net/~jbj1

Itamar S.-T. wrote:

>Hi,
>
>Any idea how I can find out the IPs of the DNS
>server(s) my Windows machine is using from Python? Is
>it available in the registry, or from some win32 API?
>
>TIA.
>
>=====
>Itamar Shtull-Trauring, itamar(at)shtull-trauring.org
>
>__________________________________________________
>Do You Yahoo!?
>Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
>
>_______________________________________________
>Python-win32 mailing list
>Python-win32@python.org
>http://mail.python.org/mailman/listinfo/python-win32
>


-- 
Jens B. Jorgensen
jens.jorgensen@tallan.com