;
; cxrx0x64.inf
;
; Copyright (c) 2019 HID Global, Inc.

[Version]
Signature="$WINDOWS NT$"
Class=SmartCardReader
ClassGuid={50DD5230-BA8A-11D1-BF5D-0000F805F530}
Provider=%ManufacturerName%
CatalogFile=cxrx0x64.cat
DriverVer = 03/21/2019,2.1.0.2

[DestinationDirs]
DefaultDestDir = 12
cxrx0W10_Device_CoInstaller_CopyFiles = 11

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

[SourceDisksFiles]
cxrx0x64.sys  = 1,,
cxrxpr.dll    = 1,,


; ================= Class section =====================
;
; Device Setup Class is already provided by Microsoft for SmartCardReader Class.


;*****************************************
; Install Section
;*****************************************

[ControlFlags]
; All PnP devices should be excluded from manual AddDevice Applet list
ExcludeFromSelect=*

[Manufacturer]
%ManufacturerName%=Standard,NTamd64

[Standard.NTamd64]
%cxrx0W10.DeviceDesc%=cxrx0W10_Device, Root\cxrx0wdm

[cxrx0W10_Device.NT]
CopyFiles=Drivers_Dir
AddReg=cxrx0W10_Device.NT.AddReg,Reader.Install.AddReg,Logon.Notifications.AddReg,iClass.AddReg

[Drivers_Dir]
cxrx0x64.sys

[cxrx0W10_Device.NT.AddReg]
HKR,, AdapterType, 0, "0100"

[Reader.Install.AddReg]
HKLM, Software\Microsoft\Cryptography\Calais\Readers,,,
HKLM, System\CurrentControlSet\Services\SCardSvr,Start,0x00010001,2
HKLM, System\CurrentControlSet\Services\CertPropSvc,Start,0x00010001,2

[Logon.Notifications.AddReg]
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

[iClass.AddReg]
HKLM, System\CurrentControlSet\Control\CardMan\RFID\,,,
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,,,
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT27_KMC0,0,2302E40BC9820FB7F91A
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT28_KMD1,0,24027BBC11D901C1F83B
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT29_KMC1,0,250244C5A9CB723E10FF
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT2A_KMD2,0,2602F95B72625D96E5FF
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT2B_KMC2,0,270218CDC0317BEBC5AD
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT2C_KMD3,0,2802BC920ADBE7BF6475
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT2D_KMC3,0,29028F152F5319A06C59
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT2E_KMD4,0,2A02F8DB31E84EBDE3EE
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT2F_KMC4,0,2B02736413FA8A8642CA
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT30_KMD5,0,2C025DA7573C127F8129
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT31_KMC5,0,2D02F9D69A65512E9ECE
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT32_KMD6,0,2E02059B57B9F01E023F
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT33_KMC6,0,2F02C6D26E85C7454D47
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT34_KMD7,0,3002EF810B8B11E483F1
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT35_KMC7,0,3102E44C320DD5FFF3AB
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT36_KMTD,0,3202AD336FB826D841C8
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT37_KMTC,0,330232790AC2AE503051
HKLM, System\CurrentControlSet\Control\CardMan\RFID\iCLASSFreeZoneKeys,SLOT38_KMD0B1,0,34025ED28AC4AEB80287


;-------------- Device Specific installation
[cxrx0W10_Device.NT.HW]
AddReg=cxrx0W10_Device.NT.AddReg.HW

[cxrx0W10_Device.NT.AddReg.HW]
HKR,, "VendorName",, "OMNIKEY"
HKR,, "IfdType",,    "5x21"
;settings for 5121 V2 based reader
HKR,, "632_ISO14443A", 0x00000001,12,3f,13,3F,15,13,16,3F,1b,a9,1c,ec
HKR,, "632_ISO14443B", 0x00000001,12,3f,13,15,15,3F,16,3F,1b,ac,1c,ec
HKR,, "632_ISO15693",  0x00000001,12,3f,13,06,15,3f,16,3F,1b,d0,1c,ed
HKR,, "632_ICLASS",    0x00000001,12,3f,13,13,15,3f,16,3F,1b,e0,1c,ed


;-------------- Service installation
[cxrx0W10_Device.NT.Services]
AddService = cxrx0x64,%SPSVCINST_ASSOCSERVICE%, cxrx0W10_Service_Inst, cxrx0W10_EventLog_Inst

; -------------- cxrx0W10 driver install sections
[cxrx0W10_Service_Inst]
DisplayName    = %cxrx0W10.SVCDESC%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\cxrx0x64.sys

; -------------- cxrx0W10 Event Log install sections
[cxrx0W10_EventLog_Inst]
AddReg=cxrx0W10_EventLog_Inst.AddReg

[cxrx0W10_EventLog_Inst.AddReg]
HKR,, EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\drivers\cxrx0x64.sys"
HKR,, TypesSupported,   0x00010001, 7


;
;--- cxrx0W10_Device Coinstaller installation ------
;

[cxrx0W10_Device.NT.CoInstallers]
AddReg=cxrx0W10_Device_CoInstaller_AddReg
CopyFiles=cxrx0W10_Device_CoInstaller_CopyFiles

[cxrx0W10_Device_CoInstaller_AddReg]
HKR,, CoInstallers32,0x00010000, "cxrxpr.dll,CoinstallerProc"

[cxrx0W10_Device_CoInstaller_CopyFiles]
cxrxpr.dll


[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
ManufacturerName="HID Global"
DiskName = "HID Global PC/SC Driver Disk"
cxrx0W10.DeviceDesc = "OMNIKEY 5x21 LAN"
cxrx0W10.SVCDESC = "OMNIKEY 5x21 LAN"
