So now what remains is to find out, why Tap-Windows driver installation failed, while of Anchorfree driver succeeded? The issue is not so simple, given any driver development is an art, but at least some relevant info is visible in the Devcon install logs...
For Tap-Windows driver:
cci: [NdisCoinst: Enter NcipHandleInstallPreProcessing]
cci: NdisCoinst: NetCfgInstanceId does not exist
cci: NdisCoinst: Guid of the adapter is {C7D17CE8-FAFA-4880-BC0E-16618BE2A009}
inf: Opened PNF: 'C:\Windows\INF\oem119.inf' ([strings])
cci: NdisCoinst: IfType from registry is 1
cci: NdisCoinst: IfType 1, Characteristics 0x81, IsIrdaDevice 0, PhysicalMediaType -1, MediaType -1, IsBridge 0, FoundGuidInDownlevel 0, EnableDhcp 2
cci: NdisCoinst: Connection name is Local Area Connection
cci: NdisCoinst: NetLuidIndex does not exist
!!! cci: NdisCoinst: NcipAllocateNetLuidIndex failed with error 0x5aa
For Anchorfree driver:
cci: [NdisCoinst: Enter NcipHandleInstallPreProcessing]
cci: NdisCoinst: NetCfgInstanceId does not exist
cci: NdisCoinst: Guid of the adapter is {BC4349DB-B304-4934-B1D5-056879100079}
inf: Opened PNF: 'C:\Windows\INF\oem121.inf' ([strings])
cci: NdisCoinst: IfType from registry is 6
cci: NdisCoinst: IfType 6, Characteristics 0x89, IsIrdaDevice 0, PhysicalMediaType 14, MediaType 0, IsBridge 0, FoundGuidInDownlevel 0, EnableDhcp 2
cci: NdisCoinst: Connection name is Local Area Connection* 11
cci: NdisCoinst: NetLuidIndex does not exist
cci: NdisCoinst: Allocated NetLuidIndex is 24
When replacing Anchorfree with Tap-Windows for an existing Tap-Windows Adapter:
cci: [NdisCoinst: Enter NcipHandleInstallPreProcessing]
cci: NdisCoinst: Guid of the adapter exists and is {BC4349DB-B304-4934-B1D5-056879100079}
inf: Opened PNF: 'C:\Windows\INF\oem119.inf' ([strings])
cci: NdisCoinst: IfType from registry is 6
cci: NdisCoinst: IfType 6, Characteristics 0x89, IsIrdaDevice 0, PhysicalMediaType 14, MediaType 0, IsBridge 0, FoundGuidInDownlevel 0, EnableDhcp 2
cci: NdisCoinst: Connection name is Local Area Connection* 11
cci: NdisCoinst: NetLuidIndex exists and is 24
cci: [NdisCoinst: Exit NcipHandleInstallPreProcessing]
dvi: CoInstaller 1: Exit
dvi: CoInstaller 2: Enter 17:09:34.138
inf: Opened PNF: 'C:\Windows\INF\oem119.inf' ([strings])
dvi: CoInstaller 2: Exit
dvi: CoInstaller 3: Enter 17:09:34.143
inf: Opened PNF: 'C:\Windows\INF\oem119.inf' ([strings])
dvi: CoInstaller 3: Exit
dvi: Class installer: Enter 17:09:34.145
cci: [NCI BEGIN INSTALL DEVICE for ROOT\NET\0001]
inf: Opened PNF: 'C:\Windows\INF\oem119.inf' ([strings])
cci: NCI: NewDeviceInstall is 0. Assuming this is an update
inf: AddReg=tap0901.reg (oem119.inf line 88)
inf: AddReg=tap0901.params.reg (oem119.inf line 89)
dvi: {Install DEVICE}
As you see from above logs, the system assigns different ifTypes to the drivers and different GUIDs, while Class GUID remains the same. Respectively, for each adapter
ifType a separate Registry key exists, and IfUsedNetLuidIndices are different for these keys. As per
NDIS Interface Types, ifType 1 corresponds to
Other adapter types, and ifType 6 to
Ethernet type. So in my system IfUsedNetLuidIndices for
Other adapter type was broken (and more likely to be in other systems, due to
Other being seldom used adapters from unknown developers 🙂), while IfUsedNetLuidIndices for Ethernet adapter type was intact.
As a result, Anchorfree driver was installed without a glitch, while Tap-Windows install failed. Later, when Anchorfree was replaced with Tap-Windows for the same Adapter, its LUID and GUID already existed, and were left intact during the driver update.
Look strange are negative values PhysicalMediaType -1, MediaType -1, which might point to the root cause of the install failure. In fact, its possible that namely Tap-Windows driver install has broken IfUsedNetLuidIndices value and the adapter count due to errors in the driver files. There is no indication this value was broken before failed driver install, and this may be the case for every other failed driver install with similar errors. Not only the driver fails to install, it also broke the Registry under certain conditions that may not be present in a fresh Windows install, where many Registry keys simply don't exist.