;
; ftWbioUmdfDriverV2.inf
;

[Version]
Signature="$Windows NT$"
Class=Biometric ; TODO: edit Class
ClassGuid={53d29ef7-377c-4d14-864b-eb3a85769359} ; TODO: edit ClassGuid
Provider=%ManufacturerName%
CatalogFile=ftWbioUmdfDriverV2.cat
DriverVer = 11/04/2020,2.0.3.71

[Manufacturer]
%ManufacturerName%=Standard,NTamd64

[Standard.NTamd64]
%SPIDeviceName%=SPIdevice_Install, ACPI\FTE3600
%USBDeviceName%=USBdevice_Install, USB\VID_2808&PID_9338
%USBDeviceName%=USBdevice_Install, USB\VID_2808&PID_93A8&MI_00

[SourceDisksFiles]
ftWbioUmdfDriverV2.dll=1
ftWbioEngineAdapter.dll=1

[SourceDisksNames]
1 = %DiskName%

; =================== USb Device ==================================

[USBdevice_Install.NT]
CopyFiles=UMDriverCopy,UMEngineCopy
Include=WINUSB.INF                      
Needs=WINUSB.NT

AddReg=FTFP_AlgInfo.AddReg

[USBdevice_Install.NT.hw]
AddReg=Biometric_Device_AddReg
AddReg=DriverPlugInAddReg, DatabaseAddReg
AddReg=usb_device_include

[USBdevice_Install.NT.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall
AddService=WinUsb,0x000001f8,WinUsb_ServiceInstall

[USBdevice_Install.NT.Wdf]
UmdfDispatcher=WinUsb
UmdfService=ftWbioUmdfDriverV2,ftWbioUmdfDriverV2_Install
UmdfServiceOrder=ftWbioUmdfDriverV2

[usb_device_include]
HKR,,"LowerFilters",0x00010008,"WinUsb"         ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND
HKR,,"WinUsbPowerPolicyOwnershipDisabled",0x00010001,1

; =================== SPI Device ==================================

[SPIdevice_Install.NT]
CopyFiles=UMDriverCopy, UMEngineCopy
AddReg=FTFP_AlgInfo.AddReg

[SPIdevice_Install.NT.hw]
AddReg=Biometric_Device_AddReg
AddReg=DriverPlugInAddReg, DatabaseAddReg

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

[SPIdevice_Install.NT.Wdf]
UmdfService=ftWbioUmdfDriverV2,ftWbioUmdfDriverV2_Install
UmdfServiceOrder=ftWbioUmdfDriverV2
UmdfDirectHardwareAccess=AllowDirectHardwareAccess  ;spi driver need config

; =============================common====================================

[ftWbioUmdfDriverV2_Install]
UmdfLibraryVersion=2.15.0 
ServiceBinary=%12%\UMDF\ftWbioUmdfDriverV2.dll

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

[WinUsb_ServiceInstall]
DisplayName     = %WinUsb_SvcDesc%
ServiceType     = 1
StartType       = 3
ErrorControl    = 1
ServiceBinary   = %12%\WinUSB.sys


[DestinationDirs]
UMDriverCopy=12,UMDF ; copy to drivers\umdf
UMEngineCopy=11, WinBioPlugins; copy to \Windows\System32\WinBioPlugins

[UMDriverCopy]
ftWbioUmdfDriverV2.dll
[UMEngineCopy]
ftWbioEngineAdapter.dll

[SignatureAttributes]
ftWbioEngineAdapter.dll=SignatureAttributes.WindowsHello

[SignatureAttributes.WindowsHello]
WindowsHello=true

;alg setting
[FTFP_AlgInfo.AddReg]
HKLM, %ServiceRoot%"\focalFp",AlgMaxTemplates,%REG_DWORD%,32
HKLM, %ServiceRoot%"\focalFp",EnrollMaxTemplates,%REG_DWORD%,12
HKLM, %ServiceRoot%"\focalFp",EnrollScore,%REG_DWORD%,100
HKLM, %ServiceRoot%"\focalFp",VerifyLevel,%REG_DWORD%,15
HKLM, %ServiceRoot%"\focalFp",UpdateLevel,%REG_DWORD%,17
HKLM, %ServiceRoot%"\focalFp",NonFingerDetect,%REG_DWORD%,0
HKLM, %ServiceRoot%"\focalFp",AppLockEnable,%REG_DWORD%,0

HKLM, %ServiceRoot%"\focalFp",CheckEnable,%REG_DWORD%,0
HKLM, %ServiceRoot%"\focalFp",ValidEreaScore,%REG_DWORD%,75
HKLM, %ServiceRoot%"\focalFp",ValidEreaCenterRate,%REG_DWORD%,200
HKLM, %ServiceRoot%"\focalFp",QualityScore,%REG_DWORD%,30
HKLM, %ServiceRoot%"\focalFp",CondScore,%REG_DWORD%,25

HKLM, %ServiceRoot%"\focalFp",Center,%REG_DWORD%,12
HKLM, %ServiceRoot%"\focalFp",BottomEdge,%REG_DWORD%,0
HKLM, %ServiceRoot%"\focalFp",LeftEdge,%REG_DWORD%,0
HKLM, %ServiceRoot%"\focalFp",RightEdge,%REG_DWORD%,0
HKLM, %ServiceRoot%"\focalFp",TopEdge,%REG_DWORD%,0
;====================Biometric======================================

[Biometric_Device_AddReg]
HKR,,"DeviceCharacteristics",0x10001,0x0100     ; Use same security checks on relative opens
HKR,,"Security",,"D:P(A;;GA;;;BA)(A;;GA;;;SY)"  ; Allow generic-all access to Built-in administrators and Local system
HKR,,"Exclusive",0x10001,1
HKR,,"SystemWakeEnabled",0x00010001,1
HKR,,"DeviceIdleEnabled",0x00010001,1
HKR,,"UserSetDeviceIdleEnabled",0x00010001,1
HKR,,"DefaultIdleState",0x00010001,1
HKR,,"DefaultIdleTimeout",0x00010001,5000

[DriverPlugInAddReg]
HKR,WinBio\Configurations,DefaultConfiguration,,"0"
HKR,WinBio\Configurations\0,SensorMode,0x10001,1                                ; Basic - 1, Advanced - 2
HKR,WinBio\Configurations\0,SystemSensor,0x10001,1                              ; UAC/Winlogon - 1
HKR,WinBio\Configurations\0,SensorAdapterBinary,,"WinBioSensorAdapter.DLL"      ; Windows built-in WBDI sensor adapter - see SensorAdapter.dll for sample vendor adapter
HKR,WinBio\Configurations\0,EngineAdapterBinary,,"ftWbioEngineAdapter.DLL"          ; Vendor engine
HKR,WinBio\Configurations\0,StorageAdapterBinary,,"WinBioStorageAdapter.DLL"    ; Windows built-in storage adapter - see StorageAdapter.dll for sample vendor adapter
HKR,WinBio\Configurations\0,DatabaseId,,"91CF558A-2540-4C3D-9A85-4AD392FDE4DA"  ; Unique database GUID

[DatabaseAddReg]
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{91CF558A-2540-4C3D-9A85-4AD392FDE4DA},BiometricType,0x00010001,0x00000008
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{91CF558A-2540-4C3D-9A85-4AD392FDE4DA},Attributes,0x00010001,0x00000001
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{91CF558A-2540-4C3D-9A85-4AD392FDE4DA},Format,,"CDAE92F1-5B32-4a91-94A8-56ACA204B3B9"
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{91CF558A-2540-4C3D-9A85-4AD392FDE4DA},InitialSize,0x00010001,0x00000020
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{91CF558A-2540-4C3D-9A85-4AD392FDE4DA},AutoCreate,0x00010001,0x00000001
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{91CF558A-2540-4C3D-9A85-4AD392FDE4DA},AutoName,0x00010001,0x00000001
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{91CF558A-2540-4C3D-9A85-4AD392FDE4DA},FilePath,,""
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{91CF558A-2540-4C3D-9A85-4AD392FDE4DA},ConnectionString,,""
; =================== Generic ==================================

[Strings]
ManufacturerName="<FocalTech Electronics(ShenZhen)Co.,Ltd>" ;TODO: Replace with your manufacturer name
ClassName="Focaltech Fingerprint Sensor" ; TODO: edit ClassName
DiskName = "ftWbioUmdfDriverV2 Installation Disk"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
USBDeviceName="FocalTech Fingerprint reader"
SPIDeviceName="FocalTech Fingerprint reader"
WinUsb_SvcDesc="WinUSB Driver"
ServiceRoot = "System\CurrentControlSet\Control"

;registry type
REG_DWORD = 0x00010001

