; LEKB.inf
;
; Installation file (.inf) for the Lenovo Keyboard Smartcard Reader for Windows 10
;
; Copyright © Lenovo, 2009 - 2023

[Version]
Signature="$CHICAGO$"
Class=SmartCardReader
ClassGuid={50DD5230-BA8A-11D1-BF5D-0000F805F530}
Provider=%MFG%
CatalogFile=LEKB.cat
DriverVer = 03/30/2023,02.05.02.00
PnpLockDown=0

[Manufacturer]
%Mfg% = Models, NTx86, NTamd64

[Models.NTx86]
%PCSC_CCID%    = PCSC_CCID,USB\VID_17EF&PID_6055&MI_01
%STC3_CCID%    = PCSC_CCID,USB\VID_17EF&PID_6007&MI_01
%PCSC_KB319U%  = PCSC_CCID,USB\VID_17EF&PID_6111&MI_01

[Models.NTamd64]
%PCSC_CCID%   = PCSC_CCIDx64,USB\VID_17EF&PID_6055&MI_01
%STC3_CCID%   = PCSC_CCIDx64,USB\VID_17EF&PID_6007&MI_01
%PCSC_KB319U% = PCSC_CCIDx64,USB\VID_17EF&PID_6111&MI_01

[ControlFlags]
ExcludeFromSelect=*

[SourceDisksNames]
1=%FLOPPY_DESCRIPTION%,,,""


[SourceDisksFiles]
LEKBx86.sys=1
LEKBx64.sys=1

[DestinationDirs]
DefaultDestDir=10,system32\drivers
PCSC_CCID.NTCopyFiles=10,system32\drivers
PCSC_CCIDx64.NTCopyFiles=10,system32\drivers


;*******************************************************************************************************
; x86 specific 
;*******************************************************************************************************


[PCSC_CCID.NTCopyFiles]
LEKBx86.sys

[PCSC_CCID.AddReg]
HKR,,ShortProviderName,0,%ShortProviderName%
HKR,,ReaderName,0,%PCSC_CCID%
HKLM,Software\Microsoft\Cryptography\Calais\Readers,,,
;HKLM, System\CurrentControlSet\Services\SCardSvr,Start,0x00010001,2
;HKLM, System\CurrentControlSet\Services\CertPropSvc,Start,0x00010001,2

[PCSC_CCID.NT.AddReg]
HKR,, IFDType,0,%STC3_IfdType%
HKR,, VendorName,0,%Mfg%

[PCSC_CCID.AddReg.HW]


[PCSC_CCID.NT]
CopyFiles= PCSC_CCID.NTCopyFiles
AddReg= PCSC_CCID.AddReg, PCSC_CCID.NT.AddReg	

[PCSC_CCID.NT.HW]
AddReg= PCSC_CCID.AddReg.HW

[PCSC_CCID.NT.Services]
AddService = %LEKB32_SERVICE_NAME%,0x00000002,PCSC_CCID_Service_Inst

[PCSC_CCID_Service_Inst]
ServiceType=%SERVICE_KERNEL_DRIVER%
StartType=%SERVICE_DEMAND_START%
ErrorControl=%SERVICE_ERROR_NORMAL%
ServiceBinary=%12%\LEKBx86.sys
AddReg= PCSC_CCID.AddReg

;*******************************************************************************************************
; x64 specific 
;*******************************************************************************************************

[PCSC_CCIDx64.NTCopyFiles]
LEKBx64.sys

[PCSC_CCIDx64.AddReg]
HKR,,ShortProviderName,0,%ShortProviderName%
HKR,,ReaderName,0,%PCSC_CCID%
HKLM,Software\Microsoft\Cryptography\Calais\Readers,,,
;HKLM, System\CurrentControlSet\Services\SCardSvr,Start,0x00010001,2
;HKLM, System\CurrentControlSet\Services\CertPropSvc,Start,0x00010001,2


[PCSC_CCIDx64.NT.AddReg]
HKR,, IFDType,0,%STC3_IfdType%
HKR,, VendorName,0,%Mfg%

[PCSC_CCIDx64.AddReg.HW]


[PCSC_CCIDx64.NT]
CopyFiles= PCSC_CCIDx64.NTCopyFiles
AddReg= PCSC_CCIDx64.AddReg, PCSC_CCIDx64.NT.AddReg	

[PCSC_CCIDx64.NT.HW]
AddReg= PCSC_CCIDx64.AddReg.HW

[PCSC_CCIDx64.NT.Services]
AddService = %LEKB64_SERVICE_NAME%,0x00000002,PCSC_CCIDx64_Service_Inst

[PCSC_CCIDx64_Service_Inst]
ServiceType=%SERVICE_KERNEL_DRIVER%
StartType=%SERVICE_DEMAND_START%
ErrorControl=%SERVICE_ERROR_NORMAL%
ServiceBinary=%12%\LEKBx64.sys
AddReg= PCSC_CCIDx64.AddReg

;-------------------[ WDF Coinstaller installation ]-------------------;

[PCSC_ccid_wdfsect]
KmdfLibraryVersion=1.13

[PCSC_CCID.NT.Wdf]
KmdfService=%LEKB32_SERVICE_NAME%,PCSC_ccid_wdfsect

[PCSC_CCIDx64.NT.Wdf]
KmdfService=%LEKB64_SERVICE_NAME%,PCSC_ccid_wdfsect


[Strings]
Mfg = "Lenovo"
ShortProviderName = "Lenovo"
FLOPPY_DESCRIPTION="Installation Disk"
PCSC_CCID = "Lenovo Keyboard Smartcard Reader"
STC3_CCID = "Lenovo Keyboard Smartcard Reader"
STC3_IfdType = "Lenovo Keyboard SCR"
ClassName="Smart Card Readers"
PCSC_KB319U="Lenovo Keyboard II Smartcard Reader"
LEKB32_SERVICE_NAME="LEKBx86"
LEKB64_SERVICE_NAME="LEKBx64"


;
; Name given to slots not defined above
;
MULTI_UNKNOWN_SLOT="-Slot"


REG_DWORD=0x00010001
REG_SZ=0x00000000
REG_MULTI_SZ=0x00010000

SERVICE_AUTO_START=2
SERVICE_DEMAND_START=3
SERVICE_KERNEL_DRIVER=1
SERVICE_ERROR_NORMAL=1

SYSTEMROOT_SYSTEM32=11
SYSTEMROOT_SYSTEM32_DRIVERS=12
