Windows – Uninstall a Windows driver when the hardware is not connected


I am developing a Windows C++ application that drives a motor controller that is plugged on USB.
This controller relies on Ftdibus drivers and it works fine on my PC.
However, on a test computer it used to work but since I messed up with the Ftdi drivers as soon as I plug the controller, I get a BSoD (mentioning Ftdibus).
I would like to cleanup the drivers, but:

  • they do not appear in Windows "uninstall programs"
  • I can't right click on the controller in the device manager and chose "uninstall" because I can't plug the controller (BSoD)
  • I tried nirsoft tool that has an option to uninstall devices but it won't work

I'm clueless, how could I clean up that mess?

PS: if anyone has documentation regarding how drivers are bound to an USB port number, I would enjoy reading on the subject

Best Solution

If this is Vista and later, the supported method for deleting a driver package is with pnputil:

Just deleting the service is sort of a bad idea, that's not the only thing that installing a driver puts in the registry.

I missed the second part of your post about how Windows binds drivers to USB devices. There's a nice description of it here:

If you need more details feel free to contact me (I specialize in Windows drivers for a living :))