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


[Version]
Signature   = "$Windows NT$"
Class       = USBDevice
ClassGuid   = {88BAE032-5A81-49f0-BC3D-A4FF138216D6}
Provider    = %FPC%
CatalogFile = fpc_disum_fw.cat
DriverVer = 01/04/2018,204.23.5.063

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

[Manufacturer]
%FPC% = Fingerprint, NTamd64

;[Fingerprint.NTx86]
;"FPC Fingerprint Reader (FW Update)"      = FpcUsb_Install_FW_SGX,  USB\VID_10A5&PID_0001&MI_01
;"FPC Fingerprint Reader (FW Update)"      = FpcUsb_Install_FW_SGX,  USB\VID_10A5&PID_FFE0&MI_01
;"FPC Fingerprint Reader (DFU)"            = FpcUsb_Install_FW_SGX,  USB\VID_10A5&PID_FFE0&REV_0000
;"FPC Fingerprint Reader (DFU)"            = FpcUsb_Install_FW_SGX,  USB\VID_10A5&PID_0002&REV_0000

[Fingerprint.NTamd64]
"FPC Fingerprint Reader (FW Update)"      = FpcUsb_Install_FW_SGX,  USB\VID_10A5&PID_0003&MI_01
"FPC Fingerprint Reader (DFU)"            = FpcUsb_Install_FW_SGX,  USB\VID_10A5&PID_0003&REV_0000

;[Fingerprint.NTarm]
;"FPC Fingerprint Reader (FW Update)"      = FpcUsb_Install_FW_SGX,  USB\VID_10A5&PID_0001&MI_01
;"FPC Fingerprint Reader (FW Update)"      = FpcUsb_Install_FW_SGX,  USB\VID_10A5&PID_FFE0&MI_01
;"FPC Fingerprint Reader (DFU)"            = FpcUsb_Install_FW_SGX,  USB\VID_10A5&PID_FFE0&REV_0000
;"FPC Fingerprint Reader (DFU)"            = FpcUsb_Install_FW_SGX,  USB\VID_10A5&PID_0002&REV_0000

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

[FpcUsb_Install_FW.NT]
CopyFiles    = UMDriverCopy
Include      = WINUSB.INF
Needs        = WINUSB.NT
FeatureScore = 0x00

[FpcUsb_Install_FW_SGX.NT]
CopyFiles    = UMDriverCopy
CopyFiles    = SGXFiles
Include      = WINUSB.INF
Needs        = WINUSB.NT
FeatureScore = 0x00


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

[FpcUsb_Install_FW.NT.hw]
AddReg       = Biometric_Device_AddReg
AddReg       = Biometric_Device_AddReg_NO_SGX

[FpcUsb_Install_FW_SGX.NT.hw]
AddReg       = Biometric_Device_AddReg
AddReg       = Biometric_Device_AddReg_SGX

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

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

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

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

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

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

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

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

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


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

[UMDFFpcUsb_Install]
UmdfLibraryVersion = 2.17.0
ServiceBinary      = %12%\UMDF\fpc_disum_fw.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

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

[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

[Biometric_Device_AddReg_NO_SGX]
HKR,"FpcFwUsb","SGX",0x10001,0

[Biometric_Device_AddReg_SGX]
HKR,"FpcFwUsb","SGX",0x10001,1


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

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

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

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

[SourceDisksFiles]
fpc_disum_fw.dll=1
SealTlsKey_sgx.dll=1 
SealTlsKey_enclave.signed.dll=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
SGXFiles                      = 11
WUDF_CoInstallers_CopyFiles   = 11

[UMDriverCopy]
fpc_disum_fw.dll

[SGXFiles]
SealTlsKey_sgx.dll
SealTlsKey_enclave.signed.dll

[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"
