Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 874
Julien M Avatar asked Jan 06 '12 22:01

Julien M


1 Answers

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

http://msdn.microsoft.com/en-us/library/windows/hardware/ff550428(v=vs.85).aspx#deleting_a_driver_package_from_the_driver_store

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:

http://blogs.msdn.com/b/oldnewthing/archive/2004/11/10/255047.aspx

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

like image 105
snoone Avatar answered Sep 21 '22 03:09

snoone