我试图通过Inf2Cat.exe命令签署我的USB INF文件,但签名结果总是失败。失败原因如下
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.
我使用了指令" Inf2Cat.exe / v / driver:%~dp0 / os:XP_X86,XP_X64"如下所示,对USB INF文件和USB INF文件进行签名。
如何解决这个问题?
[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"
答案 0 :(得分:0)
声明
var exclude = [{
id: 1,
name: 'John'
}];
var peopleArr = [{
id: 1,
name: 'John'
}, {
id: 2,
name: 'James'
}, {
id: 3,
name: 'Simon'
}];
var myObj = [];
for (key in peopleArr) {
for (k in exclude) {
if (JSON.stringify(peopleArr[key]) != JSON.stringify(exclude[k])) {
console.log(peopleArr[key]);
myObj.push(peopleArr[key]);
}
}
}
console.log(myObj);
需要更改为
CopyFiles=VirtualCOMCopyFileSection
声明
CopyFiles=FakeModemCopyFileSection
需要更改为
[VirtualCOMCopyFileSection]
usbser.sys,,,0x20