[Version]
Signature="$Windows NT$"
Class=SmartCardReader
ClassGuid={50dd5230-ba8a-11d1-bf5d-0000f805f530}
Provider=%ManufacturerName%
CatalogFile=AkCcidU2.cat
DriverVer=01/16/2019,5.1.3.1600

[Manufacturer]
%ManufacturerName%=Standard,NTamd64

[Standard.NTamd64]
%DeviceName%=UM2Ccid_Install, USB\Vid_058F&Pid_9540
%DeviceName%=UM2Ccid_Install, USB\Vid_058F&Pid_9520

[SourceDisksFiles]
AkCcidU2.dll=1

[SourceDisksNames]
1 = %DiskName%

; ============== Add reg for all readers ===========================

[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

; =================== UMDF Device ==================================

[UM2Ccid_Install.NT]
AddReg=Reader.Install.AddReg
CopyFiles=UMDriverCopy

[UM2Ccid_Install.NT.hw]
AddReg=UM2Ccid_AddReg

[UM2Ccid_Install.NT.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall

[UM2Ccid_Install.NT.Wdf]
UmdfDispatcher=NativeUSB
UmdfService=AkSCard_UMDF_2,AkSCard_UMDF_2_Install
UmdfServiceOrder=AkSCard_UMDF_2
UmdfKernelModeClientPolicy=AllowKernelModeClients

[AkSCard_UMDF_2_Install]
UmdfLibraryVersion=2.15.0 
ServiceBinary=%12%\UMDF\AkCcidU2.dll

[WUDFRD_ServiceInstall]
DisplayName = %WudfRdDisplayName%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WUDFRd.sys

[DestinationDirs]
UMDriverCopy=12,UMDF ; copy to drivers\umdf

[UMDriverCopy]
AkCcidU2.dll

[UM2Ccid_AddReg]
HKR,,"uPowerPage"           , %REG_DWORD%  , 0
HKR,,"uSsEnable"            , %REG_DWORD%  , 1
HKR,,"uWwEnable"            , %REG_DWORD%  , 0
HKR,,"uCardOutResume"       , %REG_DWORD%  , 1
HKR,,"uSsMs"                , %REG_DWORD%  , 30000

HKR,,"uDevNameSel"          , %REG_DWORD%  , 2
HKR,,"sVendorName"          , %REG_SZ%     , Alcor Micro
HKR,,"sProductName"         , %REG_SZ%     , USB Smart Card Reader

HKR,,"uDataRateSel"         , %REG_DWORD%  , 0
HKR,,"uSpeedMode"           , %REG_DWORD%  , 0
HKR,,"uRemovable"           , %REG_DWORD%  , 1
HKR,,"uSupriseRemovalOK"    , %REG_DWORD%  , 1

HKR,,"uSetDevPwrMode"       , %REG_DWORD%  , 2
HKR,,"uShowAdvSetting"      , %REG_DWORD%  , 1
HKR,,"uReaderMode"          , %REG_DWORD%  , 0

HKR,,"uMaxCWI"              , %REG_DWORD%  , 13
HKR,,"uDecCWI"              , %REG_DWORD%  , 2

HKR,,"u1stCardDelay"        , %REG_DWORD%  , 800
HKR,,"uCardOutDelay"        , %REG_DWORD%  , 200
HKR,,"uLoadSetupFW"         , %REG_DWORD%  , 1
HKR,,"uBIEn"                , %REG_DWORD%  , 1

; =================== Generic ==================================

[Strings]
ManufacturerName="Alcor Micro"
ClassName="USB SmartCard Reader Driver"
DiskName = "Installation Disc for Alcor Micro USB Smart Card Reader"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
DeviceName="Alcor Micro USB Smart Card Reader"

REG_EXPAND_SZ= 0x00020000
REG_DWORD= 0x00010001
REG_MULTI_SZ= 0x00010000
REG_BINARY= 0x00000001
REG_SZ= 0x00000000
