我们有一个许多客户使用的硬件设备。我们支持Windows 7 - 10 OS。使用此设备,包括驱动程序和软件。该设备是在中国制造的,最终使用Cypress USB驱动程序。 .inf
文件可以在下面找到。然后,中国公司在.inf
文件中为自己的设备添加了一些引用,这些引用神奇地使它与它们的软件结合使用。
我的背景不是C ++或任何与硬件相关的开发。现在,我们让客户在安装并插入驱动程序时收到代码52错误。
Windows无法验证此文件的数字签名。最近的硬件或软件更改可能安装了一个未正确签名或损坏的文件,或者可能是来自未知来源的恶意软件。
因此,经过大量的谷歌搜索,似乎中国公司没有跟上司机的最新标准。较新的设备启用了安全启动,可以阻止未正确签名的驱动程序。
现在我想知道一些事情:
.inf
文件,.sys
文件和生成的.cat
文件。.cab
生成makecab
文件是否足够? cat
文件是否已解决此问题?对于简单的.inf
文件来说,通过HCK和HLK测试似乎很有用。虽然指南非常明确,但我不完全确定在我的场景中是否存在我不需要做的具体事情。
.inf文件代码:
; Installation INF for the Cypress Generic USB Driver for Windows 2000
; Processor support for x86 based platforms.
;
; (c) Copyright 2011 Cypress Semiconductor Corporation
;
[Version]
Signature="$WINDOWS NT$"
Class=USB
ClassGUID={36FC9E60-C465-11CF-8056-444553540000}
provider=%CYUSB_Provider%
CatalogFile=CYUSB.cat
DriverVer=10/17/2011,3.4.7.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]
;%VID_XXXX&PID_XXXX.DeviceDesc%=CyUsb, USB\VID_XXXX&PID_XXXX
;for x86 platforms
[Device.NTx86]
;%VID_XXXX&PID_XXXX.DeviceDesc%=CyUsb, USB\VID_XXXX&PID_XXXX
;for x64 platforms
[Device.NTamd64]
;%VID_XXXX&PID_XXXX.DeviceDesc%=CyUsb, USB\VID_XXXX&PID_XXXX
[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_XXXX&PID_XXXX.DeviceDesc="Cypress USB Generic Driver (3.4.7.000)"
CYUSB.GUID="{AE18AA60-7F6A-11d4-97DD-00010229B959}"
CYUSB_Unused = "."
答案 0 :(得分:0)
Microsoft不断添加障碍,您可能需要在dev portal now and you need a EV cert.中签名才能注册。在执行安全启动时,干净安装和升级之间也存在差异!
我建议你阅读/加入OSR mailing list,它有multiple threads dealing with Windows 10& SHA2签名。
Their blog也可能有用。