; Copyright (C) 2014 Synaptics Incorporated, All Rights Reserved.
; synawudfbiousbViper.inf - Install the WBDI USB user-mode driver - Synaptics WBDI 
;

[Version]
Signature="$Windows NT$"
Class=Biometric
ClassGuid={53D29EF7-377C-4D14-864B-EB3A85769359}
Provider=%SYNAUMDF%
CatalogFile=synaUMDF.cat
DriverVer=11/16/2016,5.05.0100.0052

[Manufacturer]
%SYNAUMDF%=Synaptics,NTamd64

[Synaptics.NTamd64]
; TODO: Change the VendorID (VID) and ProductID (PID) to match your device
%WBDIUsbDeviceName%=Biometric_Install, USB\VID_06CB&PID_0082

;[ClassInstall32]
;AddReg=BiometricClass_RegistryAdd

;[BiometricClass_RegistryAdd]
;HKR,,,,%ClassName%
;HKR,,Icon,,"-201"
;HKR,,IconPath,0x00010000,"%%SYSTEMROOT%%\system32\SysClass.dll,-201"

[SourceDisksFiles]
synaWudfBioUsb.dll=1
synaBscAdapter.dll=1 ; Synaptics basic mode adapter
synaAdvAdapter.dll=1 ; Synaptics advanced mode adapter
WudfUpdate_01011.dll=1

[SourceDisksNames]
1 = %MediaDescription%

; =================== UMDF WBDI Usb Device - WBDI IOCTL interface ==================================

[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

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

[Device_Properties]
DeviceIcon,,,,"%%SYSTEMROOT%%\system32\SysClass.dll,-201" ; 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=synaWudfBioUsb, synaWudfBioUsb_Install
UmdfServiceOrder=synaWudfBioUsb

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

[WinUsb_Install]
KmdfLibraryVersion = 1.11

[synaWudfBioUsb_Install]
UmdfLibraryVersion=1.11.0
DriverCLSID = "{96710705-B080-4B29-A3EC-B16935AE663A}"
ServiceBinary = "%12%\UMDF\synaWudfBioUsb.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,,Security,,"D:P(A;;GA;;;BA)(A;;GA;;;SY)(A;;GA;;;S-1-5-84-0-0-0-0-0")
HKR,,"LowerFilters",0x00010008,"WinUsb"         ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND
HKR,,"Exclusive",0x10001,1
HKR,,"DeviceIdleEnabled",0x00010001,1
HKR,,"UserSetDeviceIdleEnabled",0x00010001,1
HKR,,"DefaultIdleState",0x00010001,1
HKR,,"DefaultIdleTimeout",0x00010001,5000
HKR,,"WinUsbPowerPolicyOwnershipDisabled",0x00010001,1

[DriverPlugInAddReg]
HKR,WinBio\Configurations,DefaultConfiguration,,"0"
HKR,WinBio\Configurations\0,SensorMode,0x10001,2                                ; Basic - 1, Advanced - 2
HKR,WinBio\Configurations\0,SystemSensor,0x10001,1                              ; UAC/Winlogon - 1
HKR,WinBio\Configurations\0,SensorAdapterBinary,,"SynaBscAdapter.DLL"      ; Windows built-in WBDI sensor adapter.
HKR,WinBio\Configurations\0,EngineAdapterBinary,,"synaBscAdapter.DLL"           ; Synaptics engine adapter.
HKR,WinBio\Configurations\0,StorageAdapterBinary,,"WinBioStorageAdapter.DLL"    ; Windows built-in storage adapter
HKR,WinBio\Configurations\0,DatabaseId,,"5B783138-7746-454F-B66A-1C8BC1F814D2"  ; must have Synaptics specific GUID for DB

HKR,WinBio\Configurations\1,SensorMode,0x10001,2                                ; Basic - 1, Advanced - 2
HKR,WinBio\Configurations\1,SystemSensor,0x10001,1                              ; UAC/Winlogon - 1
HKR,WinBio\Configurations\1,SensorAdapterBinary,,"synaAdvAdapter.DLL"           ; Synaptics compound adapter.
HKR,WinBio\Configurations\1,EngineAdapterBinary,,"synaAdvAdapter.DLL"           ; Synaptics compound adapter.
HKR,WinBio\Configurations\1,StorageAdapterBinary,,"synaAdvAdapter.DLL"          ; Synaptics compound adapter.
HKR,WinBio\Configurations\1,DatabaseId,,"F9E92F37-2B98-402A-9AA3-465EACA1D030"  ; must have Synaptics specific GUID for DB

[DatabaseAddReg]
HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{5B783138-7746-454F-B66A-1C8BC1F814D2},BiometricType,0x00010001,0x00000008
HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{5B783138-7746-454F-B66A-1C8BC1F814D2},Attributes,0x00010001,0x00000001
HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{5B783138-7746-454F-B66A-1C8BC1F814D2},Format,,"00000000-0000-0000-0000-000000000000"
HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{5B783138-7746-454F-B66A-1C8BC1F814D2},InitialSize,0x00010001,0x00000020
HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{5B783138-7746-454F-B66A-1C8BC1F814D2},AutoCreate,0x00010001,0x00000001
HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{5B783138-7746-454F-B66A-1C8BC1F814D2},AutoName,0x00010001,0x00000001
HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{5B783138-7746-454F-B66A-1C8BC1F814D2},FilePath,,""
HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{5B783138-7746-454F-B66A-1C8BC1F814D2},ConnectionString,,""

HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{F9E92F37-2B98-402A-9AA3-465EACA1D030},BiometricType,0x00010001,0x00000008
HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{F9E92F37-2B98-402A-9AA3-465EACA1D030},Attributes,0x00010001,0x00010003
HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{F9E92F37-2B98-402A-9AA3-465EACA1D030},Format,,"00000000-0000-0000-0000-000000000000"
HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{F9E92F37-2B98-402A-9AA3-465EACA1D030},InitialSize,0x00010001,0x00000020
HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{F9E92F37-2B98-402A-9AA3-465EACA1D030},AutoCreate,0x00010001,0x00000001
HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{F9E92F37-2B98-402A-9AA3-465EACA1D030},AutoName,0x00010001,0x00000001
HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{F9E92F37-2B98-402A-9AA3-465EACA1D030},FilePath,,""
HKLM, System\CurrentControlSet\Services\WbioSrvc\Databases\{F9E92F37-2B98-402A-9AA3-465EACA1D030},ConnectionString,,""

[USDKAddReg]
;temporarily comment this out since the call to palGetPersistentDataLongValue() currently doesn't work.
;HKLM, Software\validity\Matcher,matcherID,0x00010001,201   ; Ridgematcher=201

[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
WinBioSensorAdapterCopy=11, WinBioPlugins; copy to \Windows\System32\WinBioPlugins
CoInstallers_CopyFiles=11

SGXDLL=11 ; system32 folder

[UMDriverCopy]
synaWudfBioUsb.dll

[WinBioEngineAdapterCopy]
synaBscAdapter.dll

[WinBioSensorAdapterCopy]
synaAdvAdapter.dll

[SGXDLL]
vfm_sgx.signed.dll

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

[Strings]
SYNAUMDF="Synaptics Incorporated"
MediaDescription="Synaptics Fingerprint Sensor Driver Installation Media"
ClassName="Biometric Devices"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
WBDIUsbDeviceName="Synaptics WBDI" 
WinUsb_SvcDesc="WinUSB Driver"
