Closed duaneellissd closed 4 years ago
The process you describe is actually described in our Wiki (here) and we also have a tool called Remove-Tapwindows.ps1 that uses pnputil.exe to remove all tap-windows6 drivers from the driver store.
That said, I'm open to linking to that repo and/or documenting the manual process in tap-windows6 repo. Can you create a documentation PR?
Hmm - The link to Remove-Tapwindows.ps1 results in an 404 error.
Perhaps this entire discussion is jaded by the choice of words and terms Microsoft took when they wrote "devcon.exe"
To be more clear what I mean is this problem:
tapinstall install FOO.inf HWID
How do I try out my shinny new driver? What exactly is the process I should follow?
I think it is reasonable to think - based on the wiki, and the instructions I would do this:
tapinstall remove hwid
should work.tapinstall install FOO.inf. HWID
would install the new driver, keyword NEW driver.Exactly the above does not work. Instead Step B, re-installs the SAME driver installed above in Step 2, explicitly because that earlier driver in step 2 was "approved for installation" and thus stored in the driver store.
The command "tapinstall remove" - is sort of like a USB device, the "remove" command effectively acts like unplugging a pseudo-USB device - followed by a "install" - is like plugging the identical (old) pseudo-usb device back into the compute.
I can create a pull request for the README.rst, but that is not the wiki page....
- Step A Uninstall per the instructions, ie:
tapinstall remove hwid
should work.- Step B Then
tapinstall install FOO.inf. HWID
would install the new driver, keyword NEW driver.
These instructions do work if the previous and new driver versions differ -- both down-grade and upgrade should work because of the way devcon (tapinstall.exe) installs drivers. Not if version number is the same.
So one option is to always change the version when you make debug drivers. Otherwise, first use the powershell script mattock mentioned to cleanup the driver store. Looks like the link to the script got truncated. Try this: https://github.com/mattock/tap-windows-scripts/blob/master/Remove-Tapwindows.ps1
Agh... Version numbers... This does not solve the edit/compile/debug loop - 20 versions per day.
There's no automatic process for that in this system that I am aware of.
I presume when merged, you'll squash all commits.
Hope this helps.
I fixed the link. There was just a "." at the end, hence 404. Wiki articles can be modified by anyone who sets up an OpenVPN community services account (see "Register" link at https://community.openvpn.net).
I suggest an update to the README as follows:
Replacing the driver in a debug environment
You might find that the "tap uninstall", or 'update' does not work as think it should. Windows often "holds onto" a driver that was previously installed and reuses that driver "sys" file, for example the file might be located (hidden) in a driver store, for example to find these, use this command substituting the name of your
tap901.sys
file.Might show, for example directories like this:
To delete these, requires several steps:
pnputil.exe /e > output.txt
to capture a list of all INF files.pnputil.exe /d oem24.inf
(your numbers will vary)Once removed, retry the
tapinstall install YOURINF.inf YOURNAME
command, you should only find your new driver present.