;============================================================================ 
; Installation file (.inf) for Windows 10 Finger Print SPI Device.
;
; All Rights Reserved, Copyright(C) ELAN Microelectronics Corp. 2003-2016
;============================================================================

[Version]
Signature="$Windows NT$"
Class=Biometric
ClassGuid={53D29EF7-377C-4D14-864B-EB3A85769359}	;{7fbf1cc1-4c7f-45e9-bfa1-0ca6b2a79a70}
Provider=%ProviderName%
CatalogFile=WbfSpiDriver.cat
DriverVer=08/15/2016, 1.5.1.1

[Manufacturer]
%VenderName%=Elan,NTamd64

[Elan.NTamd64]
%DeviceName%		= Biometric_Install, ACPI\ELAN7001	; For Normal NB Type
%DeviceName%		= Biometric_Install, ACPI\ELAN7002	; For 2 In 1 NB Type

;----------------------------------------------------------------------------
; SourceDisks Sections
;----------------------------------------------------------------------------

[SourceDisksNames]
1 = %MediaDescription%

[SourceDisksFiles]
WbfSpiDriver.dll=1
EngineAdapter.dll=1
WudfUpdate_01011.dll=1
EFDUninst.dll = 1
EFDUninst.exe = 1
ElanIcon.ico = 1
EFDCoInstaller01002.dll = 1

;----------------------------------------------------------------------------
; Install Sections
;----------------------------------------------------------------------------

[DestinationDirs]
UMDriverCopy		= 12, UMDF		; \Windows\System32\drivers\UMDF
WinBioEngineAdapterCopy	= 11, WinBioPlugins	; \Windows\System32\WinBioPlugins
CoInstallers_CopyFiles	= 11
EFDApp.CopyFiles 	= 16422, %TargetDir%	; Program file

;----------------------------------------------------------------------------
; Common File Copy and Registry Operations
;----------------------------------------------------------------------------

[UMDriverCopy]
WBFSPIDriver.dll,,,0x00004000

[WinBioEngineAdapterCopy]
EngineAdapter.dll,,,0x00004000

[CoInstallers_CopyFiles]
WudfUpdate_01011.dll,,,0x00002004
EFDCoInstaller01002.dll,,,0x00002004

[EFDApp.CopyFiles]
EFDUninst.dll,,,0x00004000
EFDUninst.exe,,,0x00004000
ElanIcon.ico,,,0x00004000

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

;[ClassInstall32]
;AddReg=BiometricClass_RegistryAdd

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

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

[Biometric_Install.NT]
AddProperty=Device_Properties
CopyFiles=UMDriverCopy,\
          WinBioEngineAdapterCopy,\
          EFDApp.CopyFiles

AddReg=EFD_System.AddReg,\
       EFD_DeviceInfo.AddReg,\
       EFD_OtherSetting.AddReg

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

[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

[Biometric_Install.NT.Wdf]
UmdfService=WBFSPIDriver,WBFSPIDriver_Install
UmdfServiceOrder=WBFSPIDriver
UmdfDirectHardwareAccess = AllowDirectHardwareAccess

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

[WBFSPIDriver_Install]
UmdfLibraryVersion=1.11.0 
DriverCLSID = "{7B0E15BA-A44A-427e-AB31-EA220E3EE1D4}"
ServiceBinary=%12%\UMDF\WBFSPIDriver.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,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.
HKR,WinBio\Configurations\0,EngineAdapterBinary,,"EngineAdapter.DLL"            ; Vendor engine
HKR,WinBio\Configurations\0,StorageAdapterBinary,,"WinBioStorageAdapter.DLL"    ; Windows built-in storage adapter
HKR,WinBio\Configurations\0,DatabaseId,,"D0586DE1-1F56-4F9F-B904-67930F9A703A"  ; Unique database GUID

[DatabaseAddReg]
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{D0586DE1-1F56-4F9F-B904-67930F9A703A},BiometricType,0x00010001,0x00000008
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{D0586DE1-1F56-4F9F-B904-67930F9A703A},Attributes,0x00010001,0x00000001
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{D0586DE1-1F56-4F9F-B904-67930F9A703A},Format,,"00000000-0000-0000-0000-000000000000"
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{D0586DE1-1F56-4F9F-B904-67930F9A703A},InitialSize,0x00010001,0x00000020
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{D0586DE1-1F56-4F9F-B904-67930F9A703A},AutoCreate,0x00010001,0x00000001
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{D0586DE1-1F56-4F9F-B904-67930F9A703A},AutoName,0x00010001,0x00000001
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{D0586DE1-1F56-4F9F-B904-67930F9A703A},FilePath,,""
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{D0586DE1-1F56-4F9F-B904-67930F9A703A},ConnectionString,,""

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

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WudfUpdate_01011.dll","EFDCoInstaller01002.DLL,CoInstallerEntry"
;HKR,,CoInstallers32,0x00010000,"WUDFCoinstaller.dll"

;----------------------------------------------------------------------------
; Entry point for Uninstallation.
; This section is executed as part of Uninstallation.
;----------------------------------------------------------------------------

[Uninstall]
DelReg = Uninstall_DelReg
DelFiles = No_Files

[No_Files]

;----------------------------------------------------------------------------
; Uninstall Section
;----------------------------------------------------------------------------

[Uninstall_DelReg]
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ElanFP
HKLM,%ServiceRoot%"\ElanFP
HKCU,Software\ElanFP

;----------------------------------------------------------------------------
; Device Information Section
;----------------------------------------------------------------------------

[EFD_DeviceInfo.AddReg]
HKLM,%ServiceRoot%"\ElanFP\DeviceInfo",DeviceType,%REG_DWORD%,1			; 0 = USB, 1 = SPI
HKLM,%ServiceRoot%"\ElanFP\DeviceInfo",AcceptSampleHint,%REG_DWORD%,18		; Max Enroll Times (1~50)
HKLM,%ServiceRoot%"\ElanFP\DeviceInfo",CoveragePercent,%REG_DWORD%,80		; Coverage Percent (20~100)

[EFD_OtherSetting.AddReg]
HKLM,%ServiceRoot%"\ElanFP\OtherSetting",ResetType,%REG_DWORD%,1		; 0 = None, 1 = TP_PTP
HKLM,%ServiceRoot%"\ElanFP\OtherSetting",TP_VID,%REG_DWORD%,0x04F3
HKLM,%ServiceRoot%"\ElanFP\OtherSetting",TP_PID,%REG_DWORD%,0x3032

;----------------------------------------------------------------------------
; System Section
;----------------------------------------------------------------------------

[EFD_System.AddReg]
HKLM,%ServiceRoot%"\ElanFP",InstallDir,%REG_SZ%,"%1%"
HKLM,%ServiceRoot%"\ElanFP",Version,%REG_SZ%,"%DriverVersion%"
HKLM,%ServiceRoot%"\ElanFP",DriverVersion,%REG_SZ%,"ELAN SPI FingerPrinter %DriverVersion%_%DriverBit%_%DriverVersionExtend%"

; Windows\CurrentVersion\Uninstall
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ElanFP,DisplayName,%REG_SZ%,"ELAN SPI FingerPrinter"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ElanFP,UninstallString,%REG_EXPAND_SZ%,"%%ProgramFiles%%\%TargetDir%\EFDUninst.exe"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ElanFP,DisplayVersion,%REG_SZ%,"%DriverVersion%"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ElanFP,DisplayIcon,%REG_EXPAND_SZ%,"%%ProgramFiles%%\%TargetDir%\ElanIcon.ico"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ElanFP,Publisher,%REG_SZ%,%Publisher%
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ElanFP,URLInfoAbout,%REG_SZ%,"www.emc.com.tw"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ElanFP,NoModify,%REG_DWORD%,1
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ElanFP,NoRepair,%REG_DWORD%,1
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ElanFP,EstimatedSize,%REG_DWORD%,12595

;----------------------------------------------------------------------------
; String Table
;----------------------------------------------------------------------------

[Strings]
VenderName		= "ELAN"
ProviderName		= "ELAN Finger Print"
Publisher 		= "ELAN Microelectronic Corp."
MediaDescription	= "Elan Driver Installation Media"
ClassName		= "Biometric Devices"
WudfRdDisplayName	= "Windows Driver Foundation - User-mode Driver Framework Reflector"
DeviceName		= "ELAN WBF Fingerprint Sensor"
TargetDir		= "ElanFP"
ServiceRoot 		= "System\CurrentControlSet\Control"

; Registry Type
REG_EXPAND_SZ		= 0x00020000 
REG_DWORD		= 0x00010001 
REG_MULTI_SZ		= 0x00010000
REG_BINARY		= 0x00000001
REG_SZ			= 0x00000000

; ELAN FP Driver Information
DriverDate		= "08/15/2016"
DriverVersion		= "1.5.1.1"
DriverBit		= "X64"
DriverVersionExtend	= "WHQL"        ; Beta or WHQL
