windowshardwareuninstallationdrivers

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:

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


Solution

  • 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 :))