; LECKB.inf
;
; Installation file (.inf) for the Lenovo Keyboard Smartcard Reader for Windows 2K/XP/Server2003/Server2008/Vista/Windows7/Windows 8/Windows 8.1//Windows 10
;
; Copyright © Lenovo, 2009 - 2017

[Version]
Signature="$CHICAGO$"
Class=SmartCardReader
ClassGuid={50DD5230-BA8A-11D1-BF5D-0000F805F530}
Provider=%MFG%
CatalogFile=LEKB.cat
DriverVer=01/20/2017,02.03

[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

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

[ControlFlags]
ExcludeFromSelect=*

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

[SourceDisksNames.x86]
2=%FLOPPY_DESCRIPTION%,,,\x86

[SourceDisksNames.amd64]
2=%FLOPPY_DESCRIPTION%,,,\x64

[SourceDisksFiles]
LEKBx86.sys=1
LEKBx64.sys=1
WdfCoInstaller01011.dll=2

[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
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,DLLName,0,wlnotify.dll
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,Logon,0,SCardStartCertProp
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,Logoff,0,SCardStopCertProp
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,Lock,0,SCardSuspendCertProp
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,Unlock,0,SCardResumeCertProp
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,Enabled,0x00010001,1
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,Impersonate,0x00010001,1
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,Asynchronous,0x00010001,1

[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
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,DLLName,0,wlnotify.dll
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,Logon,0,SCardStartCertProp
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,Logoff,0,SCardStopCertProp
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,Lock,0,SCardSuspendCertProp
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,Unlock,0,SCardResumeCertProp
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,Enabled,0x00010001,1
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,Impersonate,0x00010001,1
HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\ScCertProp,Asynchronous,0x00010001,1

[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 ]-------------------;

[DestinationDirs]
CoInstaller_CopyFiles=%SYSTEMROOT_SYSTEM32%

[CoInstaller_CopyFiles]
WdfCoInstaller01011.dll

[CoInstaller_AddReg]
HKR,,CoInstallers32,%REG_MULTI_SZ%,"WdfCoInstaller01011.dll,WdfCoInstaller"

[PCSC_ccid_wdfsect]
KmdfLibraryVersion=1.11

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

;--------------------------PCSC_CCID-----------------------------------------------

[PCSC_CCID.NT.CoInstallers]
CopyFiles=CoInstaller_CopyFiles
AddReg=CoInstaller_AddReg

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


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

;--------------------------PCSC_CCIDx64-----------------------------------------------
[PCSC_CCIDx64.NT.CoInstallers]
CopyFiles=CoInstaller_CopyFiles
AddReg=CoInstaller_AddReg

[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"
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
