;/*++
;
;Copyright (c) Synaptics Inc All rights Reserved
;
;Module Name:
;
;    synaWudfU2fhid.inf
;
;Abstract:
;    INF file for installing Synaptics UMDF virtual U2FHID minidriver
;
;Installation Notes:
;    Using Devcon: Type "devcon install synaWudfU2fhid.inf Root\synaWudfU2fhid" to install
;
;---*/

[Version]
Signature="$Windows NT$"
Class=HIDClass
ClassGuid={745a17a0-74d3-11d0-b6fe-00a0c90f57da}
Provider=%Provider%
CatalogFile=synaUMDF.cat
DriverVer=04/18/2017,5.5.3514.1066

; ================= Device section =====================

[Manufacturer]
%SynMfg%=SynMfg,NTamd64, NTamd64.6.2

;For Windows 7 and later
[SynMfg.NTamd64]
%DeviceName%=synaWudfU2fhidDevice_Install, Root\VID_06CB&PID_0088_MI01 ; TODO: edit hw-id

;For win8 and later so we can use inbox HID-UMDF mapper
[SynMfg.NTamd64.6.2]
%DeviceName%=synaWudfU2fhidDevice_Install.win8, Root\VID_06CB&PID_0088_MI01 ; TODO: edit hw-id

;===============================================================
;   synaWudfU2fhid for pre-win8 (uses developer-provided HID-UMDF mapper)
;===============================================================

[synaWudfU2fhidDevice_Install.NT]
CopyFiles=synahidumdf.Files.Ext,UMDriverCopy

[synaWudfU2fhidDevice_Install.NT.hw]
AddReg=synaWudfU2fhid_AddReg

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

[synaWudfU2fhidDevice_Install.NT.Services]
AddService=WUDFRd,0x000001f8,WUDFRD_ServiceInstall
AddService=synahidumdf, 0x000001fa, synahidumdf.AddService ;flag 0x2 sets this as the service for the device

[synahidumdf.AddService]
DisplayName    = %synahidumdf.SvcDesc%
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 1                  ; SERVICE_ERROR_NORMAL
ServiceBinary  = %10%\System32\Drivers\synahidumdf.sys
LoadOrderGroup = Base

[synaWudfU2fhidDevice_Install.NT.Wdf]
UmdfService="synaWudfU2fhid",synaWudfU2fhid_Install
UmdfServiceOrder=synaWudfU2fhid
UmdfHostProcessSharing=ProcessSharingDisabled
UmdfKernelModeClientPolicy=AllowKernelModeClients
UmdfFileObjectPolicy=AllowNullAndUnknownFileObjects
UmdfMethodNeitherAction=Copy

;===============================================================
;   synaWudfU2fhid for win8 and newer (uses inbox HID-UMDF mapper)
;===============================================================

[synaWudfU2fhidDevice_Install.win8.NT]
CopyFiles=UMDriverCopy

[synaWudfU2fhidDevice_Install.win8.NT.hw]
AddReg=synaWudfU2fhid_AddReg

[synaWudfU2fhidDevice_Install.win8.NT.Services]
AddService=WUDFRd,0x000001f8,WUDFRD_ServiceInstall
AddService=mshidumdf, 0x000001fa, mshidumdf.AddService ;flag 0x2 sets this as the service for the device

[mshidumdf.AddService]
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 1                  ; SERVICE_ERROR_NORMAL
ServiceBinary  = %10%\System32\Drivers\mshidumdf.sys

[synaWudfU2fhidDevice_Install.win8.NT.CoInstallers]
CopyFiles=CoInstallers_CopyFiles
AddReg=CoInstallers_AddReg

[synaWudfU2fhidDevice_Install.win8.NT.Wdf]
UmdfService="synaWudfU2fhid",synaWudfU2fhid_Install
UmdfServiceOrder=synaWudfU2fhid
UmdfHostProcessSharing=ProcessSharingDisabled
UmdfKernelModeClientPolicy=AllowKernelModeClients
UmdfFileObjectPolicy=AllowNullAndUnknownFileObjects
UmdfMethodNeitherAction=Copy
UmdfFsContextUsePolicy=CanUseFsContext2

; ================= common section =====================

[synaWudfU2fhid_AddReg]
HKR,,"LowerFilters",0x00010008,"WUDFRd" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND

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

[synaWudfU2fhid_Install]
UmdfLibraryVersion=1.11.0 
ServiceBinary=%12%\UMDF\synaWudfU2fhid.dll
DriverCLSID={fc132dfe-38da-4820-9907-d27bfd7058dc}

; ================= copy files =====================

[synahidumdf.Files.Ext]
synahidumdf.sys

[UMDriverCopy]
synaWudfU2fhid.dll

[SourceDisksNames]
1 = %DiskName%,,,

[SourceDisksFiles]
synahidumdf.sys = 1
synaWudfU2fhid.dll=1
WudfUpdate_01011.dll=1

[DestinationDirs]
UMDriverCopy=12,UMDF ; copy to drivers\umdf
DefaultDestDir = 12

; ================= WDF Coinstaller installation =====================

[DestinationDirs]
CoInstallers_CopyFiles=11

[CoInstallers_CopyFiles]
WudfUpdate_01011.dll

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

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

[Strings]
Provider = "Synaptics"
SynMfg = "Synaptics"
;ClassName="Human Interface Devices"
DiskName = "synaWudfU2fhid Installation Disk"
synahidumdf.SvcDesc="Service for synahidmini Device"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
DeviceName="SynaWudfU2fhid Device"
