13

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

Julien M
  • 657
  • 3
  • 10
  • 40

3 Answers3

21

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

snoone
  • 5,409
  • 18
  • 19
9

How I do it is one of three ways:

  1. Go into Device Manager, select 'view' menu and select the 'Show hidden devices'. Find your device description and select the 'uninstall' menu option. [easy]

  2. You can use the Service Control Manager command line 'SC' to delete the device driver from the registry. You will need to know the installed driver name. [medium]

  3. Manually delete the driver setup in the registry. Using regedit, you can delete the registry entries for the driver. Drivers registry setup lives under 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services'. Find the driver name key and delete it. [hard]

Shane Powell
  • 13,698
  • 2
  • 49
  • 61
-1

I would try this. It seems like it would work for your case.

ouflak
  • 2,458
  • 10
  • 44
  • 49
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 09 '21 at 11:14
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/30543729) – Bhagyesh Dec 10 '21 at 09:39