windows - 需要在 Windows 7 中完全删除设备驱动程序

标签 windows windows-7 usb driver inf

我有一个 Windows 7 无法识别的旧 USB 设备,所以我获取了处理 USB 通信的芯片的设备驱动程序。修改后,我用它来为设备安装。我知道这很愚蠢,但现在我需要摆脱它。

以下是 inf 安装文件中的代码。这个没有我改的VID和PID。我需要撤销它所做的所有更改。

; Installation INF for the Cypress Generic USB Driver for Windows Vista
; Processor support for OS unknown platforms.
;
; (c) Copyright 2010 Cypress Semiconductor Corporation
;

[Version]
Signature="$WINDOWS NT$"
Class=USB
ClassGUID={36FC9E60-C465-11CF-8056-444553540000}
provider=%CYUSB_Provider%
CatalogFile=CYUSB.cat
DriverVer=10/12/2010,3.4.4.000

[SourceDisksNames]
1=%CYUSB_Install%,,,

[SourceDisksFiles]
CYUSB.sys = 1

[DestinationDirs]
CYUSB.Files.Ext = 10,System32\Drivers

[ControlFlags]
ExcludeFromSelect = *

[Manufacturer]
%CYUSB_Provider%=Device,NT,NTx86,NTamd64

;for all platforms
[Device]
;%VID_XXXX&PID_XXXX.DeviceDesc%=CyUsb, USB\VID_XXXX&PID_XXXX


;for windows 2000 non intel platforms
[Device.NT]
; Cypress FX2LP default ID
%VID_04B4&PID_8613.DeviceDesc%=CyUsb, USB\VID_04B4&PID_8613

; Cypress FX1 default ID
%VID_04B4&PID_6473.DeviceDesc%=CyUsb, USB\VID_04B4&PID_6473

; Cypress Streamer Device.  CyStream firmware examples use this VID/PID
%VID_04B4&PID_1003.DeviceDesc%=CyUsb, USB\VID_04B4&PID_1003

; Cypress FX2LP Example Device.  DVK firmware examples use this VID/PID
%VID_04B4&PID_1004.DeviceDesc%=CyUsb, USB\VID_04B4&PID_1004


;for x86 platforms
[Device.NTx86]
; Cypress FX2LP default ID
%VID_04B4&PID_8613.DeviceDesc%=CyUsb, USB\VID_04B4&PID_8613

; Cypress FX1 default ID
%VID_04B4&PID_6473.DeviceDesc%=CyUsb, USB\VID_04B4&PID_6473


; Cypress Streamer Device.  CyStream firmware examples use this VID/PID
%VID_04B4&PID_1003.DeviceDesc%=CyUsb, USB\VID_04B4&PID_1003

; Cypress FX2LP Example Device.  DVK firmware examples use this VID/PID
%VID_04B4&PID_1004.DeviceDesc%=CyUsb, USB\VID_04B4&PID_1004


;for x64 platforms
[Device.NTamd64]
; Cypress FX2LP default ID
%VID_04B4&PID_8613.DeviceDesc%=CyUsb, USB\VID_04B4&PID_8613

; Cypress FX1 default ID
%VID_04B4&PID_6473.DeviceDesc%=CyUsb, USB\VID_04B4&PID_6473

; Cypress Streamer Device.  CyStream firmware examples use this VID/PID
%VID_04B4&PID_1003.DeviceDesc%=CyUsb, USB\VID_04B4&PID_1003

; Cypress FX2LP Example Device.  DVK firmware examples use this VID/PID
%VID_04B4&PID_1004.DeviceDesc%=CyUsb, USB\VID_04B4&PID_1004

[CYUSB]
CopyFiles=CYUSB.Files.Ext
AddReg=CyUsb.AddReg

[CYUSB.HW]
AddReg=CYUSB.AddReg.Guid

[CYUSB.Services]
Addservice = CYUSB,2,CYUSB.AddService

[CYUSB.NT]
CopyFiles=CYUSB.Files.Ext
AddReg=CyUsb.AddReg

[CYUSB.NT.HW]
AddReg=CYUSB.AddReg.Guid

[CYUSB.NT.Services]
Addservice = CYUSB,2,CYUSB.AddService


[CYUSB.NTx86]
CopyFiles=CYUSB.Files.Ext
AddReg=CyUsb.AddReg

[CYUSB.NTx86.HW]
AddReg=CYUSB.AddReg.Guid

[CYUSB.NTx86.Services]
Addservice = CYUSB,2,CYUSB.AddService

[CYUSB.NTamd64]
CopyFiles=CYUSB.Files.Ext
AddReg=CyUsb.AddReg

[CYUSB.NTamd64.HW]
AddReg=CYUSB.AddReg.Guid

[CYUSB.NTamd64.Services]
Addservice = CYUSB,2,CYUSB.AddService


[CYUSB.AddReg]
; Deprecating - do not use in new apps to identify a CYUSB driver
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,CYUSB.sys
; You may optionally include a check for DriverBase in your application to check for a CYUSB driver
HKR,,DriverBase,,CYUSB.sys
HKR,"Parameters","MaximumTransferSize",0x10001,4096
HKR,"Parameters","DebugLevel",0x10001,2
HKR,,FriendlyName,,%CYUSB_Description%

[CYUSB.AddService]
DisplayName    = %CYUSB_Description%
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 1                  ; SERVICE_ERROR_NORMAL
ServiceBinary  = %10%\System32\Drivers\CYUSB.sys
AddReg         = CYUSB.AddReg
LoadOrderGroup = Base

[CYUSB.Files.Ext]
CYUSB.sys

[CYUSB.AddReg.Guid]
HKR,,DriverGUID,,%CYUSB.GUID%

[Strings]
CYUSB_Provider    = "Cypress"
CYUSB_Company     = "Cypress Semiconductor Corporation"
CYUSB_Description = "Cypress Generic USB Driver"
CYUSB_DisplayName = "Cypress USB Generic"
CYUSB_Install     = "Cypress CYUSB Driver Installation Disk"
VID_04B4&PID_8613.DeviceDesc="Cypress EZ-USB FX2LP No EEPROM"
VID_04B4&PID_6473.DeviceDesc="Cypress EZ-USB FX1 - No EEPROM"
VID_04B4&PID_1004.DeviceDesc="Cypress EZ-USB Example Device"
VID_04B4&PID_1003.DeviceDesc="Cypress EZ-USB Streamer Device"
VID_XXXX&PID_XXXX.DeviceDesc="Cypress USB Generic Driver (3.4.4.000)"
CYUSB.GUID="{AE18AA60-7F6A-11d4-97DD-00010229B959}"
CYUSB_Unused      = "."

最佳答案

另一种选择(微软的方式,不在注册表中进行随机未知删除)是以“以管理员身份运行”启动 CMD,然后通过以下方式在 Windows 7 驱动程序存储中列出所有已安装的驱动程序:

pnputil -e

如果这导致列表变长,您可以通过以下方式将其通过管道传输到文件中:

pnputil -e > C:\driverexport.txt

如果您现在找到了需要删除的驱动程序,请使用以下命令:

pnputil.exe -d OemNUMBER.inf

将 NUMBER 替换为示例中的号码。您可以尝试使用 -F 强制卸载。重启完成后,驱动程序应该消失了。

这可能对删除旧驱动程序并取回一些 HD 空间也很有用。

Source

关于windows - 需要在 Windows 7 中完全删除设备驱动程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19886995/

相关文章:

android - 在 Android 上检测 USB 网络共享

windows - 升级到 Windows 10,现在 WAMP 无法工作

delphi - Windows 7 与 Delphi 集成

c++ - 在窗口操作系统中从 c 命令启动应用程序

c# - Windows 7 任务栏进度

wpf - window 7 触控

linux - C++检测USB串口设备插入/拔出

iphone - 从 Windows 与 iOS 对话?

windows - FaSTLane windows 无法安装

c# - Windows是否有一些内置的数据库引擎?