Friday, August 27, 2010

VirtualPC Virtual Network Adapters in Windows (Server 2008)

I am using a set of Microsoft VHDs to demo their software (specifically Microsoft Office Communication Server 2007 R2), and I wondered why my Local Area Connection was around Local Area Connection 24 and my network card was Microsoft Virtual Machine Bus Network 15. My guess is that Microsoft passed these VHDs around for review before release, so it stored past local area connections and network adapters. The Virtual Machines had a startup script called startup.cmd that referenced a Local Area Connection that wasn't the current one. I changed the number to match mine, then decided to remove the old adapters through the registry. Here's what I did (take caution and perform backups before editing the registry):

Under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Current Version\Network Cards\, network cards are enumerated by number. The Description subkey lists the name of the adapter and the ServiceName subkey lists the Service GUID. I noted the ServiceName and deleted the keys.

For Windows Vista/Server 2008 and above, the keys under HKEY_LOCAL_MACHINE\Microsoft\Windows NT\Current Version\NetworkList\Profiles represent the networks. I deleted all but the network I was interested in (the domain). The network names are listed under Description and ProfileName. Interestingly, one of the networks was corp.microsoft.com.

Under HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}, network connections are listed (like Local Area Connection n) by GUID with their names under Connection\Name. I deleted all the GUIDs for the connections I didn't want.

Under HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\Description, adapters are enumeratec and used the numbers are listed under the data of the REG_MULTI_SZ key. I cleared the data for Microsoft Virtual Machine Bus Network Adapter and Microsoft VMBus Network Adapter.

Under HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services are listed the the GUIDs representing the network cards from the ...Network Cards subkeys (ServiceName). I deleted the corresponding GUIDs from the Network Cards.

Under HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services\Tcpip\Adapters are listed GUIDs representing adapters. I deleted the unwanted keys. The same is true for HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services\Tcpip\Interfaces. I left HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services\Tcpip6\Parameters\Interfaces alone.

I found these Microsoft Knowledge Base articles, but they apply to NT 3.5 - 4.0:
http://support.microsoft.com/kb/146333
http://support.microsoft.com/kb/147797

1 comment:

  1. The blog is very much technical to implement but thanks to you for writing it so well.I can never imagine that such things could happen as you stated that "Microsoft passed these VHDs around for review before release, so it stored past local area connections and network adapters"
    what is a digital signature

    ReplyDelete