未连接硬件时卸载 Windows 驱动程序
我正在开发一个 Windows C++ 应用程序,用于驱动插入 USB 的电机控制器。 该控制器依赖于 Ftdibus 驱动程序,在我的 PC 上运行良好。 然而,在测试计算机上它曾经可以工作,但由于我一插入控制器就弄乱了 Ftdi 驱动程序,所以我得到了 BSoD(提到 Ftdibus)。 我想清理驱动程序,但是:
- 它们没有出现在 Windows“卸载程序”中
- 我无法右键单击设备管理器中的控制器并选择“卸载”,因为我无法插入控制器 (BSoD)
- 我尝试了nirsoft 工具,它有一个卸载设备的选项,但它不起作用
我一无所知,我怎样才能清理掉这个烂摊子呢?
PS:如果有人有关于如何将驱动程序绑定到 USB 端口号的文档,我很乐意阅读该主题
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果是 Vista 及更高版本,则支持删除驱动程序包的方法是使用 pnputil:
http://msdn.microsoft.com/en-us/library/windows/hardware/ff550428(v=vs.85).aspx#deleting_a_driver_package_from_the_driver_store
仅仅删除服务是一个坏主意,这并不是安装驱动程序放入注册表的唯一内容。
我错过了您关于 Windows 如何将驱动程序绑定到 USB 设备的帖子的第二部分。这里有一个很好的描述:
http://blogs.msdn.com/ b/oldnewthing/archive/2004/11/10/255047.aspx
如果您需要更多详细信息,请随时与我联系(我专门从事 Windows 驱动程序为生:))
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 :))
我的操作方法是以下三种方法之一:
进入设备管理器,选择“查看”菜单,然后选择“显示隐藏的设备”。找到您的设备描述并选择“卸载”菜单选项。 [简单]
您可以使用服务控制管理器命令行 'SC' 从注册表中删除设备驱动程序。您需要知道已安装的驱动程序名称。 [中]
手动删除注册表中的驱动程序设置。使用 regedit,您可以删除驱动程序的注册表项。驱动程序注册表设置位于“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services”下。找到驱动程序名称键并将其删除。 [hard]
How I do it is one of three ways:
Go into Device Manager, select 'view' menu and select the 'Show hidden devices'. Find your device description and select the 'uninstall' menu option. [easy]
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]
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]
我会尝试这个。
看起来它适合你的情况。
I would try this.
It seems like it would work for your case.