Open mmacpherson1 opened 8 years ago
Hi and thanks for the detailed report!
Did you do a a real upgrade? Or did you uninstall tap-windows first, then install tap-windows6 afterwards?
If a tap-driver is present, then our NSI installers run "devcon.exe upgrade", which can apparently sometimes fail. I suspect that going from tap-windows to tap-windows6 is more prone to breakage than more minor upgrade scenarios.
Good afternoon Mattock, thanks for the quick reply.
We are able to reproduce the issue doing a upgrade using the TAP-windows downloads from the main page: https://openvpn.net/index.php/open-source/downloads.html
Have tap-windows-9.9.2_3.exe installed and working on a 2012 R1 system, then attempt the upgrade to tap-windows-9.21.1.exe. The issue appears to occur 100% on a 2012 R1 system from the testing performed. If you perform a uninstall of the driver and do a clean install of the NDIS 6 version, the issue is not seen and you can see a example of that within my Procmon output.
Let me know if you have any questions.
Matt
For now, I added a warning to the tap-windows downloads section about doing upgrades. As a long-term solution I'll add some code to the NSIS installer to prevent upgrade of tap-windows to tap-windows6, and to do a full uninstall/install instead.
Thanks, will leave it up to your team to pick the best solution, but please make sure to note my findings that if we simply move the addition of the keys down into the tap0901.reg section, they are correctly written every time and this would avoid needing to do a uninstall. Allowing you to avoid trying to detect.
Good day,
I have been looking into a TAP 5 to TAP6 upgrade issue that appears to only impact 2012 R1 systems, and wanted to pass my findings back for your consideration.
So on a 2012 R1 system that has TAP 5 installed, when you attempt to perform the upgrade the process will fail with an event like the following in the setupapi.dev.log:
!!! dvi: Device not started: Device has problem: 0x1f: CM_PROB_FAILED_ADD.
When you look within Device Manager you can have one of two possible states:
The error in Device Manager shows as:
This device is not working properly because Windows cannot load the drivers required for this device. (Code 31)
Doing some review I found that the ‘_MediaType’ and ‘_PhysicalMediaType’ registry keys under the adapter instance for tap0901 are not being written in this upgrade scenario. If you manually add these two missing keys the driver is now able to start without issue.
Working the issue I found two possible solutions:
Option 1 is to manually add the two missing registry keys for the driver before you do your upgrade to TAP 6.
Option 2 is slightly more involved.
If we look within OEMVISTA INF, after the blank Characteristics value (due to issue 15), currently we have the following:
To allow the INF to always lay these three keys down, moving them within the AddReg for tap0901.reg allows the upgrade to proceed without issue, just as a suggestion.
Supporting evidence.
If we have a Procmon capture running while the installer does the upgrade from TAP 5 to 6, when the HKLM\System\CurrentControlSet\Control\Network\NDISTempKey\ structure is built we don’t see any events for MediaType or PhysicalMediaType. The only events we see are attempts to query the keys and them reported as not found:
8:05:40.9829317 PM DrvInst.exe 10104 RegQueryValue HKLM\System\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0013MediaType NAME NOT FOUND Length: 144 8:05:40.9829514 PM DrvInst.exe 10104 RegQueryValue HKLM\System\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0013PhysicalMediaType NAME NOT FOUND Length: 144
When you perform a fresh clean install of TAP 6 on the same system, once again when the NDISTempKey structure is built we don’t see any events for these keys. But we do see rather than a Query call DrvInst Set’s both of these keys:
8:11:06.0012482 PM DrvInst.exe 3024 RegSetValue HKLM\System\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0013MediaType SUCCESS Type: REG_DWORD, Length: 4, Data: 0 8:11:06.0013126 PM DrvInst.exe 3024 RegSetValue HKLM\System\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0013PhysicalMediaType SUCCESS Type: REG_DWORD, Length: 4, Data: 14
Now for comparison when we move these three keys down into the AddReg call, when the NDISTempKey is built we see all three listed, then added to the adapter instance location, and finally the Query Value call’s succeed.
8:24:59.5386870 PM DrvInst.exe 6304 RegSetValue HKLM\System\CurrentControlSet\Control\Network\NDISTempKeyIfType SUCCESS Type: REG_DWORD, Length: 4, Data: 6 8:24:59.5387484 PM DrvInst.exe 6304 RegSetValue HKLM\System\CurrentControlSet\Control\Network\NDISTempKeyMediaType SUCCESS Type: REG_DWORD, Length: 4, Data: 0 8:24:59.5388187 PM DrvInst.exe 6304 RegSetValue HKLM\System\CurrentControlSet\Control\Network\NDISTempKey*PhysicalMediaType SUCCESS Type: REG_DWORD, Length: 4, Data: 14
8:24:59.8681578 PM DrvInst.exe 6304 RegSetValue HKLM\System\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0013IfType SUCCESS Type: REG_DWORD, Length: 4, Data: 6 8:24:59.8682016 PM DrvInst.exe 6304 RegSetValue HKLM\System\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0013MediaType SUCCESS Type: REG_DWORD, Length: 4, Data: 0 8:24:59.8683201 PM DrvInst.exe 6304 RegSetValue HKLM\System\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0013*PhysicalMediaType SUCCESS Type: REG_DWORD, Length: 4, Data: 14
8:24:59.8746089 PM DrvInst.exe 6304 RegQueryValue HKLM\System\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0013MediaType SUCCESS Type: REG_DWORD, Length: 4, Data: 0 8:24:59.8746259 PM DrvInst.exe 6304 RegQueryValue HKLM\System\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0013PhysicalMediaType SUCCESS Type: REG_DWORD, Length: 4, Data: 14
Thanks,
Matthew