;
;  Biometric Sensor Device - USB 
;
;  Copyright (c) Fingerprint Cards AB 
; ------------------------------------------------------------------------


[Version]
Signature   = "$Windows NT$"
Class       = Biometric
ClassGuid   = {53D29EF7-377C-4D14-864B-EB3A85769359}
Provider    = %FPC%
CatalogFile = fpc_disum_um_usb.cat
DriverVer = 01/04/2018,204.23.5.063

; =================== Manufacturer/Models sections =======================

[Manufacturer]
%FPC% = Fingerprint, NTx86, NTamd64, NTarm

[Fingerprint.NTx86]
"FPC Fingerprint Reader (Disum)"      = FpcUsb_Install,  USB\VID_10A5&PID_0003&MI_00

[Fingerprint.NTamd64]
"FPC Fingerprint Reader (Disum)"      = FpcUsb_Install,  USB\VID_10A5&PID_0003&MI_00

[Fingerprint.NTarm]
"FPC Fingerprint Reader (Disum)"      = FpcUsb_Install,  USB\VID_10A5&PID_0003&MI_00

; ------------------------------------------------------------------------

[FpcUsb_Install.NT]
CopyFiles    = UMDriverCopy
CopyFiles    = WinBioTouchEngineCopy 
AddProperty  = Device_Properties
Include      = WINUSB.INF
Needs        = WINUSB.NT
FeatureScore = 0x00

; ------------------------------------------------------------------------

[FpcUsb_Install.NT.hw]
AddReg       = Biometric_Device_AddReg
AddReg       = DriverPlugInAddReg
AddReg       = DatabaseAddReg

; ------------------------------------------------------------------------

[FpcUsb_Install.NT.Services]
AddService   = WUDFRd, 0x01fa, WUDFRD_ServiceInstall
AddService   = WinUsb, 0x01f8, WinUsb_ServiceInstall

; ------------------------------------------------------------------------

[FpcUsb_Install.NT.CoInstallers]
AddReg       = WUDF_CoInstallers_AddReg
CopyFiles    = WUDF_CoInstallers_CopyFiles

; ------------------------------------------------------------------------

[FpcUsb_Install.NT.Wdf]
UmdfDispatcher         = WinUsb
UmdfService            = FpcG2Usb,UMDFFpcUsb_Install
UmdfServiceOrder       = FpcG2Usb
UmdfHostProcessSharing = ProcessSharingDisabled
UmdfImpersonationLevel = Impersonation

; ------------------------------------------------------------------------

[UMDFFpcUsb_Install]
UmdfLibraryVersion = 2.17.0
ServiceBinary      = %12%\UMDF\fpc_disum.dll

[WUDFRD_ServiceInstall]
DisplayName        = %WudfRdDisplayName%
ServiceType        = 1
StartType          = 3
ErrorControl       = 1
ServiceBinary      = %12%\WUDFRd.sys
Dependencies       = wudfsvc
;LoadOrderGroup     = Base

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

; ------------------------------------------------------------------------

[Device_Properties]
DeviceIcon,,,,"%%SYSTEMROOT%%\system32\SysClass.dll,-201"

; ------------------------------------------------------------------------

[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,1
HKR,,"DeviceIdleEnabled",0x00010001,1
HKR,,"UserSetDeviceIdleEnabled",0x00010001,1
HKR,,"DefaultIdleState",0x00010001,1
HKR,,"DefaultIdleTimeout",0x00010001,3000
;HKR,,"WinUsbPowerPolicyOwnershipDisabled",0x00010001,1

[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"
HKR,WinBio\Configurations\0,StorageAdapterBinary,,"WinBioStorageAdapter.dll"
HKR,WinBio\Configurations\0,EngineAdapterBinary,,"FpcDisumEngine.dll"
HKR,WinBio\Configurations\0,DatabaseId,,"171BFD93-42E0-4585-9CFC-AC761CE39E31"

; ------------------------------------------------------------------------

[SignatureAttributes]
FpcDisumEngine.dll = SignatureAttributes.WindowsHello
fpc_enclave.signed.dll = SignatureAttributes.WindowsHello
fpc_enclave.dll = SignatureAttributes.WindowsHello
 
[SignatureAttributes.WindowsHello]
WindowsHello = true

; ------------------------------------------------------------------------

[DatabaseAddReg]
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{171BFD93-42E0-4585-9CFC-AC761CE39E31},BiometricType,0x00010001,0x00000008
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{171BFD93-42E0-4585-9CFC-AC761CE39E31},Attributes,0x00010001,0x00000001
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{171BFD93-42E0-4585-9CFC-AC761CE39E31},Format,,"00000000-0000-0000-0000-000000000000"
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{171BFD93-42E0-4585-9CFC-AC761CE39E31},InitialSize,0x00010001,0x00000020
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{171BFD93-42E0-4585-9CFC-AC761CE39E31},AutoCreate,0x00010001,0x00000001
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{171BFD93-42E0-4585-9CFC-AC761CE39E31},AutoName,0x00010001,0x00000001
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{171BFD93-42E0-4585-9CFC-AC761CE39E31},FilePath,,""
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{171BFD93-42E0-4585-9CFC-AC761CE39E31},ConnectionString,,""

; ------------------------------------------------------------------------

[SourceDisksFiles]
fpc_disum.dll=1
FpcDisumEngine.dll=1
fpc_enclave.signed.dll=1
sgx_white_list_cert.bin=1

[SourceDisksNames.x86]
1 = %MediaDescription%,,,\x86

[SourceDisksNames.amd64]
1 = %MediaDescription%,,,\x64

[SourceDisksNames.arm]
1 = %MediaDescription%,,,\arm

[WUDF_CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WUDFCoInstaller.dll"

[DestinationDirs]
UMDriverCopy                  = 12,UMDF
WinBioTouchEngineCopy         = 11,WinBioPlugins ; copy to \Windows\System32\WinBioPlugins
WUDF_CoInstallers_CopyFiles   = 11

[UMDriverCopy]
fpc_disum.dll

[WinBioTouchEngineCopy]
FpcDisumEngine.dll
fpc_enclave.signed.dll
sgx_white_list_cert.bin

[WUDF_CoInstallers_CopyFiles]


; ------------------------------------------------------------------------

[Strings]
FPC                 = "Fingerprint Cards AB"
MediaDescription    = "Fingerprint Cards Driver Installation Media"
ClassName           = "Biometric Sensor Driver"
WudfRdDisplayName   = "Windows Driver Foundation - User-mode Driver Framework Reflector"
WinUsb_SvcDesc      = "WinUSB Driver"
