如何检查是否安装了 USB CDC 驱动程序

How to check if USB CDC driver is installed

我需要在客户电脑上安装 USB CDC 驱动程序(com 端口),这样我的 c++ mfc 应用程序才能正常工作。在 windows 8 & 10 上预装了驱动程序,问题是 windows.

的旧版本

我有silabs的驱动程序,有.cat、.inf和.exe文件。打开安装程序后 - 它只是在确认条款后显示 "Silicon Laboratories. Inc. (usbser) Ports (03/26/2014 6.1.7601.17514) - Ready to use",没有别的。

我尝试了 this but there is no usbser.sys or something like that in the list. And also this,但没有找到 "USB\VID_1BA4&PID_0002"(我在 .inf 文件中找到的)。我还尝试在注册表中搜索 ClassGUID (4D36E978-E325-11CE-BFC1-08002BE10318) & class=ports。它总是找到相同的东西,这可能不是我要找的东西。

我应该寻找什么?什么参数重要?谢谢

.inf 文件

[Version]
Signature="$WINDOWS NT$"
Class=Ports
ClassGUID={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%SILICONLABS%
DriverVer=03/26/2014,6.1.7601.17514
CatalogFile=SiLabs-CDC.cat

[Manufacturer]
%SILICONLABS%=DeviceList, NT, NTAMD64, NTIA64

;------------------------------------------------------------------------------

[DeviceList]
%CDCDEVICE_1BA4_0002%=DriverInstall,USB\VID_1BA4&PID_0002
%CDCDEVICE_2544_0003%=DriverInstall,USB\VID_2544&PID_0003
%CDCDEVICE_10C4_0003%=DriverInstall,USB\VID_10C4&PID_0003
%CDCDEVICE_2544_0008_02%=DriverInstall,USB\VID_2544&PID_0008&MI_02
%CDCDEVICE_10C4_0008_02%=DriverInstall,USB\VID_10C4&PID_0008&MI_02

[DeviceList.NT]
%CDCDEVICE_1BA4_0002%=DriverInstall,USB\VID_1BA4&PID_0002
%CDCDEVICE_2544_0003%=DriverInstall,USB\VID_2544&PID_0003
%CDCDEVICE_10C4_0003%=DriverInstall,USB\VID_10C4&PID_0003
%CDCDEVICE_2544_0008_02%=DriverInstall,USB\VID_2544&PID_0008&MI_02
%CDCDEVICE_10C4_0008_02%=DriverInstall,USB\VID_10C4&PID_0008&MI_02

[DeviceList.NTAMD64]
%CDCDEVICE_1BA4_0002%=DriverInstall,USB\VID_1BA4&PID_0002
%CDCDEVICE_2544_0003%=DriverInstall,USB\VID_2544&PID_0003
%CDCDEVICE_10C4_0003%=DriverInstall,USB\VID_10C4&PID_0003
%CDCDEVICE_2544_0008_02%=DriverInstall,USB\VID_2544&PID_0008&MI_02
%CDCDEVICE_10C4_0008_02%=DriverInstall,USB\VID_10C4&PID_0008&MI_02

[DeviceList.NTIA64]
%CDCDEVICE_1BA4_0002%=DriverInstall,USB\VID_1BA4&PID_0002
%CDCDEVICE_2544_0003%=DriverInstall,USB\VID_2544&PID_0003
%CDCDEVICE_10C4_0003%=DriverInstall,USB\VID_10C4&PID_0003
%CDCDEVICE_2544_0008_02%=DriverInstall,USB\VID_2544&PID_0008&MI_02
%CDCDEVICE_10C4_0008_02%=DriverInstall,USB\VID_10C4&PID_0008&MI_02

;------------------------------------------------------------------------------

[DriverInstall]
Include=mdmcpq.inf
CopyFiles=FakeModemCopyFileSection
AddReg=SerialPropPageAddReg

[DriverInstall.Services]
Include=mdmcpq.inf
AddService = usbser, 0x00000002, DriverServiceInst

[DriverServiceInst]
DisplayName=%SERVICE%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\usbser.sys

[SerialPropPageAddReg]
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"

;------------------------------------------------------------------------------

[Strings]
SILICONLABS = "Silicon Laboratories, Inc."
CDCDEVICE_1BA4_0002 = "Silicon Labs CDC Serial port"
CDCDEVICE_2544_0003 = "Silicon Labs CDC Serial port"
CDCDEVICE_10C4_0003 = "Silicon Labs CDC Serial port"
CDCDEVICE_2544_0008_02 = "Silicon Labs CDC Serial port"
CDCDEVICE_10C4_0008_02 = "Silicon Labs CDC Serial port"
SERVICE   = "USB CDC Serial Port Driver"

您使用的代码示例是Enumerating All Device Drivers in the System(已加载的驱动程序)。

我使用 FTDI USB 转 UART 设备进行测试。通过连接到 PC 的设备(内存中加载的驱动程序),我可以像下面列出相关的驱动程序,否则我不能。

因此尝试连接 USB CDC 设备并重试。

根据评论更新:"But where I can find if the driver is already signed or not, that's the question."

右击驱动的*.sys文件,勾选数字签名选项卡