I'm trying to sign my USB INF file by Inf2Cat.exe command, but the signing result is always fail. The fail reason as below
Errors:
22.9.10: usbser.sys in [virtualcomcopyfilesection] is missing
from [SourceDisksFiles] section in \tpp_test.inf;
driver may not sign correctly until this is resolved.
I used the instruct "Inf2Cat.exe /v /driver:%~dp0 /os:XP_X86,XP_X64" to sign the USB INF file, and the USB INF file as below.
How to fix this problem?
[Version]
Signature="$Windows NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%MFG%
;LayoutFile = layout.inf
CatalogFile.nt = DEVICE.cat
CatalogFile.ntx86 = DEVICE_X86.cat
CatalogFile.ntia64 = DEVICE_IA64.cat
CatalogFile.ntamd64 = DEVICE_AMD64.cat
DriverVer=07/23/2009,1.0
[SourceDisksFiles]
; Use inbox driver
[SourceDisksNames]
; Use inbox driver
[Manufacturer]
%MFG%=MFG, NT, NTx86, NTia64, NTamd64
[MFG]
%DEVICE%=DEVICE_USBCDC, USB\VID_1234&PID_4321
[MFG.NT]
%DEVICE%=DEVICE_USBCDC, USB\VID_1234&PID_4321
[MFG.NTx86]
%DEVICE%=DEVICE_USBCDC, USB\VID_1234&PID_4321
[MFG.NTia64]
%DEVICE%=DEVICE_USBCDC, USB\VID_1234&PID_4321
[MFG.NTamd64]
%DEVICE%=DEVICE_USBCDC, USB\VID_1234&PID_4321
[DestinationDirs]
VirtualCOMCopyFileSection = 12 ;%windir%\system32\drivers
DefaultDestDir = 12
;************************************
;* NT
;************************************
;************************************
;* DEVICE
[DEVICE_USBCDC.NT]
include=mdmcpq.inf
CopyFiles=VirtualCOMCopyFileSection
AddReg=VirtualCOMAddReg
[DEVICE_USBCDC.NT.Services]
include=mdmcpq.inf
AddService = usbser, 0x00000002, Service_Inst
[DEVICE_USBCDC.NT.HW]
include=mdmcpq.inf
;************************************
;* NTx86
;************************************
;************************************
;* DEVICE
[DEVICE_USBCDC.NTx86]
include=mdmcpq.inf
CopyFiles=VirtualCOMCopyFileSection
AddReg=VirtualCOMAddReg
[DEVICE_USBCDC.NTx86.Services]
include=mdmcpq.inf
AddService = usbser, 0x00000002, Service_Inst
[DEVICE_USBCDC.NTx86.HW]
include=mdmcpq.inf
;************************************
;* NTia64
;************************************
;************************************
;* DEVICE
[DEVICE_USBCDC.NTia64]
include=mdmcpq.inf
CopyFiles=VirtualCOMCopyFileSection
AddReg=VirtualCOMAddReg
[DEVICE_USBCDC.NTia64.Services]
include=mdmcpq.inf
AddService = usbser, 0x00000002, Service_Inst
[DEVICE_USBCDC.NTia64.HW]
include=mdmcpq.inf
;************************************
;* NTamd64
;************************************
;************************************
;* DEVICE
[DEVICE_USBCDC.NTamd64]
include=mdmcpq.inf
CopyFiles=VirtualCOMCopyFileSection
AddReg=VirtualCOMAddReg
[DEVICE_USBCDC.NTamd64.Services]
include=mdmcpq.inf
AddService = usbser, 0x00000002, Service_Inst
[DEVICE_USBCDC.NTamd64.HW]
include=mdmcpq.inf
[VirtualCOMCopyFileSection]
usbser.sys,,,0x20
[VirtualCOMAddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,usbser.sys
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
[Service_Inst]
DisplayName = %Serial.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbser.sys
LoadOrderGroup = Base
[Strings]
MFG = "Test"
DEVICE = "Test device"
DISC_NAME = "USB Driver"
Serial.SvcDesc = "MFG USB Virtual COM"
The statement
CopyFiles=VirtualCOMCopyFileSection
need to be changed as
CopyFiles=FakeModemCopyFileSection
And the statement
[VirtualCOMCopyFileSection]
usbser.sys,,,0x20
need to be changed as
[FakeModemCopyFileSection]
;USBSER.sys,,,0x20