;
; EgisTouchFP.inf - Install the EGIS USB user-mode driver - WBDI sample
;

[Version]
Signature="$Windows NT$"
Class=Biometric
ClassGuid={53D29EF7-377C-4D14-864B-EB3A85769359}
Provider=%EGIS%
DriverVer=03/25/2019,3.5.3.19
CatalogFile=EgisTouchFP.cat

[Manufacturer]
%EGIS%=EgisTec,NTamd64

[EgisTec.NTamd64]
%EGISUsbDeviceName%=Biometric_Install, USB\VID_1C7A&PID_0300
%EGISUsbDeviceName%=Biometric_Install, USB\VID_1C7A&PID_0570

[SourceDisksFiles]
EgisTouchFP.dll=1
EgisTouchFPEngine.dll=1
EgisTouchFPSensor.dll=1
wudfupdate_01011.dll=1

[SourceDisksNames]
1 = %MediaDescription%


[Biometric_Install.NT]
CopyFiles=UMDriverCopy, WinBioEngineAdapterCopy
AddProperty=Device_Properties
Include=WINUSB.INF                      ; Import sections from WINUSB.INF
Needs=WINUSB.NT                         ; Run the CopyFiles & AddReg directives for WinUsb.INF
FeatureScore=0xFE;

[Biometric_Install.NT.hw]
AddReg=Biometric_Device_AddReg
AddReg=DriverPlugInAddReg, DatabaseAddReg, ContactSensor_AddReg, FPParameters_AddReg

[Device_Properties]
DeviceIcon,,,,"%12%\UMDF\EgisTouchFP.dll,101" ; This is where a device specific icon can be specified.

[Biometric_Install.NT.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall  ; flag 0x2 sets this as the service for the device
AddService=WinUsb,0x000001f8,WinUsb_ServiceInstall  ; this service is installed because its a filter.

[Biometric_Install.NT.Wdf]
KmdfService=WINUSB, WinUsb_Install
UmdfDispatcher=WinUsb
UmdfService=EgisTouchFP, EgisFP_Install
UmdfServiceOrder=EgisTouchFP

[Biometric_Install.NT.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles

[WinUsb_Install]
KmdfLibraryVersion = 1.9

[EgisFP_Install]
UmdfLibraryVersion=1.9.0
DriverCLSID = "{9864FE59-4DE5-42FC-B845-689F5A0794C6}"
ServiceBinary = "%12%\UMDF\EgisTouchFP.dll"

[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,,"LowerFilters",0x00010008,"WinUsb" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND
HKR,,"Exclusive",0x10001,1
HKR,,"SystemWakeEnabled",0x00010001,0
HKR,,"DeviceIdleEnabled",0x00010001,1
HKR,,"UserSetDeviceIdleEnabled",0x00010001,0
HKR,,"DefaultIdleState",0x00010001,0
HKR,,"DefaultIdleTimeout",0x00010001,10000
HKR,,"WinUsbPowerPolicyOwnershipDisabled",0x00010001,0

[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,,"EgisTouchFPSensor.DLL"		; EgisTec sensor adapter
HKR,WinBio\Configurations\0,EngineAdapterBinary,,"EgisTouchFPEngine.DLL"		; EgisTec engine adapter
HKR,WinBio\Configurations\0,StorageAdapterBinary,,"WinBioStorageAdapter.DLL"    ; Windows built-in storage adapter
HKR,WinBio\Configurations\0,DatabaseId,,"19FEB8C6-FD8D-446F-8DE2-CE45B315E27A"  ; Unique database GUID
HKLM,System\CurrentControlSet\Control\usbflags,IgnoreHWSerNum1C7A0570,0x10001,1 ; Ignore serial number

[DatabaseAddReg]
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{19FEB8C6-FD8D-446F-8DE2-CE45B315E27A},BiometricType,0x00010001,0x00000008
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{19FEB8C6-FD8D-446F-8DE2-CE45B315E27A},Attributes,0x00010001,0x00000001
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{19FEB8C6-FD8D-446F-8DE2-CE45B315E27A},Format,,"00000000-0000-0000-0000-000000000000"
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{19FEB8C6-FD8D-446F-8DE2-CE45B315E27A},InitialSize,0x00010001,0x00000020
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{19FEB8C6-FD8D-446F-8DE2-CE45B315E27A},AutoCreate,0x00010001,0x00000001
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{19FEB8C6-FD8D-446F-8DE2-CE45B315E27A},AutoName,0x00010001,0x00000001
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{19FEB8C6-FD8D-446F-8DE2-CE45B315E27A},FilePath,,""
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{19FEB8C6-FD8D-446F-8DE2-CE45B315E27A},ConnectionString,,""

[ContactSensor_AddReg]
HKR,EgisTouchFP\ ,"RemoteWakeupEnable",0x00010001,0x0000001
HKR,EgisTouchFP\ ,"FetchImageMode",0x00010001,0x80000003
HKR,EgisTouchFP\ ,"FingerOnMode",0x00010001,0x00000000
HKR,EgisTouchFP\ ,"ResumingDetectModeParameterTuningEnabled",0x00010001,0
HKR,EgisTouchFP\ ,"FingerOnThresholdLoose",0x00010001,2
HKR,EgisTouchFP\ ,"FingerOnThreshold",0x00010001,6

[ContactSensor_AddReg.security]
"D:P(A;;GA;;;BA)(A;;GA;;;SY)(A;;GAKA;;;WD)"


[FPParameters_AddReg]
; Use this addreg to input parameters to Match/Extract module
;HKLM,SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services\EgisTouchFP\FPParameters,"VerticalFlipEnabled",0x00010001,0x00000001
;HKLM,SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services\EgisTouchFP\FPParameters,"Optimization",0x00010001,0x00000000

[FPParameters_AddReg.security]
"D:P(A;;GA;;;BA)(A;;GA;;;SY)(A;;GAKA;;;WD)"



[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

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"wudfupdate_01011.dll"

[CoInstallers_CopyFiles]
wudfupdate_01011.dll

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

[UMDriverCopy]
EgisTouchFP.dll

[WinBioEngineAdapterCopy]
EgisTouchFPEngine.dll
EgisTouchFPSensor.dll

[SignatureAttributes] 
EgisTouchFPEngine.dll = SignatureAttributes.WindowsHello
EgisTouchFPSensor.dll = SignatureAttributes.WindowsHello
 
[SignatureAttributes.WindowsHello] 
WindowsHello = true 

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

[Strings]
EGIS="Egis Technology Inc."
MediaDescription="Egis Technology Inc. Biometric Driver Installation Media"
ClassName="Biometric Devices"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
EGISUsbDeviceName="EgisTec Touch Fingerprint Sensor"
WinUsb_SvcDesc="WinUSB Driver"
