Find Network Card Interfaces via Windows Registry

Network cards names are stored here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards

Here is an example data:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\12]
"ServiceName"="{01285227-ECFB-419D-8D1D-8C510D880D1A}"
"Description"="Qualcomm Atheros AR956x Wireless Network Adapter"

Details about a network card are stored here:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces

Here is an example data:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\{1A285227-ECFB-419D-8D1D-8C510D880DCB}]
"UseZeroBroadcast"=dword:00000000
"EnableDeadGWDetect"=dword:00000001
"EnableDHCP"=dword:00000001
"NameServer"="8.8.8.8,8.8.4.4"
"Domain"=""
"RegistrationEnabled"=dword:00000001
"RegisterAdapterName"=dword:00000000
"DhcpIPAddress"="192.168.1.140"
"DhcpSubnetMask"="255.255.255.0"
"DhcpServer"="192.168.1.1"
"Lease"=dword:00005460
"LeaseObtainedTime"=dword:56efcf29
"T1"=dword:56eff959
"T2"=dword:56f018fd
"LeaseTerminatesTime"=dword:56f02389
"AddressType"=dword:00000000
"IsServerNapAware"=dword:00000000
"DhcpConnForceBroadcastFlag"=dword:00000001
"DhcpNetworkHint"=""
"DhcpInterfaceOptions"=hex:06,00
"DhcpGatewayHardware"=hex:c0,a8
"DhcpGatewayHardwareCount"=dword:00000001
"DhcpNameServer"="192.168.1.1"
"DhcpDefaultGateway"=hex(7):31,00
"DhcpDomain"="homenet.yourisp.com"
"DhcpSubnetMaskOpt"=hex(7):32,00

To find IPv6 details look here:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\Interfaces

More Related Posts