Categories

Archives

How to remove ghost Network Interfaces in Windows 7/2008

Sometimes when you remove an old network interface, even if you uninstall drivers for that interface, the information about it and some data stays in the registry. It’s not critical situation but you’ll be unable to rename a new Interface connection to the same as the old one was, you will also not able to use the same IP address, also windows will report problems on this in some situations. If you’re running network services on your server like TMG 2010 it can also report different problems.

Unfortunately it’s not easy to remove such ghost NIC from system. You won’t see it in Device Manager even if you check the option to show hidden devices. But there is a solution on how to remove such NIC using devcon.exe tool. It is an alternate tool to Device Manager, which lets you manage Windows devices.

You should get the newest version of this tool, especially if you want to manage an x64 bit OS. Bad thing is that this tool is not available as a single download, you’ll have to download Windows Driver Kit (current version 7.1) and extract the files from the iso. The needed files you’ll find in the \WDK\setuptools Archive (see the right OS Version). You should copy the file _devcon.exe_00000 to your disk and rename it to devcon.exe

Now you can use the tool, first you need to look for all network devices. Use one of the commands
devcon findall =net or
devcon listclass net

In my case the first one worked and the second one did not display the ghost adapter

devcon findall =net
PCI\VEN_10EC&DEV_8168&SUBSYS_81681849&REV_06\4&7F30B43&0&00E5: Realtek PCIe GBE Family Controller
ROOT\*TUNMP\0000                                            : Teredo Tunneling Pseudo-Interface
ROOT\MS_L2TPMINIPORT\0000                                   : WAN Miniport (L2TP)
ROOT\MS_NDISWANBH\0000                                      : WAN Miniport (Network Monitor)
ROOT\MS_NDISWANIP\0000                                      : WAN Miniport (IP)
ROOT\MS_NDISWANIPV6\0000                                    : WAN Miniport (IPv6)
ROOT\MS_PPPOEMINIPORT\0000                                  : WAN Miniport (PPPOE)
ROOT\MS_PPTPMINIPORT\0000                                   : WAN Miniport (PPTP)
ROOT\MS_SSTPMINIPORT\0000                                   : WAN Miniport (SSTP)
ROOT\VMWARE\0000                                            : VMware Virtual Ethernet Adapter for VMnet3
SW\{EEAB7790-C514-11D1-B42B-00805FC1270E}\ASYNCMAC          : RAS Async Adapter
USB\VID_057C&PID_6201\00040ECAEFBC                          : AVM FRITZ!WLAN USB Stick v1.1
USB\VID_0BDA&PID_8172\00E04C000001                          : Realtek RTL8191SU Wireless LAN 802.11n USB 2.0 Network Adapter
13 matching device(s) found.

As you can see on the output above, there are 13 Devices, the USB AVM FRITZ!WLAN USB Stick is not present in the system and should be removed. To accomplish that we use command

devcon -r remove "@USB\VID_057C&PID_6201\00040ECAEFBC"
USB\VID_057C&PID_6201\00040ECAEFBC                          : Removed
1 device(s) were removed.

After that we again execute the command for list of NICs

C:\Users\Administrator>devcon findall =net
PCI\VEN_10EC&DEV_8168&SUBSYS_81681849&REV_06\4&7F30B43&0&00E5: Realtek PCIe GBE Family Controller
ROOT\*TUNMP\0000                                            : Teredo Tunneling Pseudo-Interface
ROOT\MS_L2TPMINIPORT\0000                                   : WAN Miniport (L2TP)
ROOT\MS_NDISWANBH\0000                                      : WAN Miniport (Network Monitor)
ROOT\MS_NDISWANIP\0000                                      : WAN Miniport (IP)
ROOT\MS_NDISWANIPV6\0000                                    : WAN Miniport (IPv6)
ROOT\MS_PPPOEMINIPORT\0000                                  : WAN Miniport (PPPOE)
ROOT\MS_PPTPMINIPORT\0000                                   : WAN Miniport (PPTP)
ROOT\MS_SSTPMINIPORT\0000                                   : WAN Miniport (SSTP)
ROOT\VMWARE\0000                                            : VMware Virtual Ethernet Adapter for VMnet3
SW\{EEAB7790-C514-11D1-B42B-00805FC1270E}\ASYNCMAC          : RAS Async Adapter
USB\VID_0BDA&PID_8172\00E04C000001                          : Realtek RTL8191SU Wireless LAN 802.11n USB 2.0 Network Adapter
12 matching device(s) found.

As we can see the not existing NIC has been fully removed from system.

 

This post is also available in: German, Polish

3 comments to How to remove ghost Network Interfaces in Windows 7/2008