Uninstall a Windows driver when the hardware is not connected

44,097

Solution 1

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

Solution 2

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]

Share:
44,097
Julien M
Author by

Julien M

Updated on December 10, 2021

Comments

  • Julien M
    Julien M over 2 years

    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
    Julien M over 12 years
    Already tried method #1: device does not show up. Will try #2 and #3. Thanks
  • John Strood
    John Strood about 8 years
    @snoone How do I uninstall and install back again a device driver?
  • Michael
    Michael over 6 years
    argh! how am i supposed to know what this driver's name is?
  • Admin
    Admin over 2 years
    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.
  • Bhagyesh
    Bhagyesh over 2 years
    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