;*****************************************************************************
;*
;*  AIRPLANEMODEHID.INF  -   Airplane Mode Mini-Driver
;*  Copyright 2012-2017, Insyde Corp.
;*
;*  INF File for AirplaneMode Miniport Driver
;*
;*****************************************************************************
[Version]
Signature="$Windows NT$"
Class=HIDClass
ClassGuid={745a17a0-74d3-11d0-b6fe-00a0c90f57da}
Provider=%VENDOR%
DriverVer=06/28/2017,%DriverVersion%
CatalogFile=AirplaneModeHid.cat

[SourceDisksFiles]
AirplaneModeHid.sys  = 99
AirplaneModeHid.inf  = 99
DPInst.exe           = 99
uninstall.exe        = 99
WdfCoInstaller01011.dll=99 ; make sure the number matches with SourceDisksNames

[SourceDisksNames]
99 = %DISK_NAME%,,,""

[DestinationDirs]
DriverInstall = 12
DrvPkgInstall = 16422, %TargetDir%  ; Program file
DrvPkgUninstall = 16422, %TargetDir%    ; Program file
AirplaneModeHid.Inst_CoInstaller_CopyFiles = 11

[Manufacturer]
%VENDOR%=Vendor, NTx86.6.1, NTamd64.6.1

; For Win7 and later so that we can use inbox HID-KMDF mapper
[Vendor.NTx86.6.1]
%AirplaneModeHid%    = AirplaneModeHid.Inst, ACPI\VEN_PNP&DEV_C000

[Vendor.NTamd64.6.1]
%AirplaneModeHid%    = AirplaneModeHid.Inst.amd64, ACPI\VEN_PNP&DEV_C000

;===============================================================
;   Instead of using hidkmdf.sys as a filter, use the inbox
;   mshidkmdf.sys as a mapper filter
;===============================================================
[AirplaneModeHid.Inst.NT]
; Just copy the driver. No neeed to copy other system binaries.
CopyFiles = DriverInstall, DrvPkgInstall

[AirplaneModeHid.Inst.NT.HW]
AddReg = DefineKeys,SysKeys,UninstallKeys
DelReg = DelRegistryKeys

[AirplaneModeHid.Inst.amd64.NT]
; Just copy the driver. No neeed to copy other system binaries.
CopyFiles = DriverInstall, DrvPkgInstall

[AirplaneModeHid.Inst.amd64.NT.HW]
AddReg = DefineKeys,SysKeys,UninstallKeys
DelReg = DelRegistryKeys

;
; hidkmdf is the function driver and AirplaneModeHid is the lower filter
;
[AirplaneModeHid.Inst.NT.Services]
AddService = AirplaneModeHid,0x00000002, AirplaneModeHid_Service_Inst

[AirplaneModeHid.Inst.amd64.NT.Services]
AddService = AirplaneModeHid,0x00000002, AirplaneModeHid_Service_Inst

[DefineKeys]
HKLM,Software\Clevo\AirplaneMode\H170,Bus,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\H170,Device,0x10001,0x0000001f
HKLM,Software\Clevo\AirplaneMode\H170,Function,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\H170,VID_PID,0x10001,0xA1448086
HKLM,Software\Clevo\AirplaneMode\H170,ECRAMBASE,0x10001,0xFF700100

HKLM,Software\Clevo\AirplaneMode\Z170,Bus,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\Z170,Device,0x10001,0x0000001f
HKLM,Software\Clevo\AirplaneMode\Z170,Function,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\Z170,VID_PID,0x10001,0xA1458086
HKLM,Software\Clevo\AirplaneMode\Z170,ECRAMBASE,0x10001,0xFF700100

HKLM,Software\Clevo\AirplaneMode\HM170,Bus,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\HM170,Device,0x10001,0x0000001f
HKLM,Software\Clevo\AirplaneMode\HM170,Function,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\HM170,VID_PID,0x10001,0xA14E8086
HKLM,Software\Clevo\AirplaneMode\HM170,ECRAMBASE,0x10001,0xFF700100

HKLM,Software\Clevo\AirplaneMode\Z270,Bus,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\Z270,Device,0x10001,0x0000001f
HKLM,Software\Clevo\AirplaneMode\Z270,Function,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\Z270,VID_PID,0x10001,0xA2C58086
HKLM,Software\Clevo\AirplaneMode\Z270,ECRAMBASE,0x10001,0xFF700100

HKLM,Software\Clevo\AirplaneMode\H270,Bus,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\H270,Device,0x10001,0x0000001f
HKLM,Software\Clevo\AirplaneMode\H270,Function,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\H270,VID_PID,0x10001,0xA2C48086
HKLM,Software\Clevo\AirplaneMode\H270,ECRAMBASE,0x10001,0xFF700100

HKLM,Software\Clevo\AirplaneMode\HM175,Bus,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\HM175,Device,0x10001,0x0000001f
HKLM,Software\Clevo\AirplaneMode\HM175,Function,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\HM175,VID_PID,0x10001,0xA1528086
HKLM,Software\Clevo\AirplaneMode\HM175,ECRAMBASE,0x10001,0xFF700100

HKLM,Software\Clevo\AirplaneMode\KBL-U,Bus,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\KBL-U,Device,0x10001,0x0000001f
HKLM,Software\Clevo\AirplaneMode\KBL-U,Function,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\KBL-U,VID_PID,0x10001,0x9D4E8086
HKLM,Software\Clevo\AirplaneMode\KBL-U,ECRAMBASE,0x10001,0xFF700100

HKLM,Software\Clevo\AirplaneMode\APL,Bus,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\APL,Device,0x10001,0x0000001f
HKLM,Software\Clevo\AirplaneMode\APL,Function,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\APL,VID_PID,0x10001,0x5AE88086
HKLM,Software\Clevo\AirplaneMode\APL,ECRAMBASE,0x10001,0xFEFF0100

;1.4.0.5 add SKL-U Base, SKL-U Premium
HKLM,Software\Clevo\AirplaneMode\SKL-U-Base,Bus,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\SKL-U-Base,Device,0x10001,0x0000001f
HKLM,Software\Clevo\AirplaneMode\SKL-U-Base,Function,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\SKL-U-Base,VID_PID,0x10001,0x9D438086
HKLM,Software\Clevo\AirplaneMode\SKL-U-Base,ECRAMBASE,0x10001,0xFF700100

HKLM,Software\Clevo\AirplaneMode\SKL-U-Premium,Bus,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\SKL-U-Premium,Device,0x10001,0x0000001f
HKLM,Software\Clevo\AirplaneMode\SKL-U-Premium,Function,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\SKL-U-Premium,VID_PID,0x10001,0x9D488086
HKLM,Software\Clevo\AirplaneMode\SKL-U-Premium,ECRAMBASE,0x10001,0xFF700100

HKLM,Software\Clevo\AirplaneMode\BSW,Bus,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\BSW,Device,0x10001,0x0000001f
HKLM,Software\Clevo\AirplaneMode\BSW,Function,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\BSW,VID_PID,0x10001,0x229C8086
HKLM,Software\Clevo\AirplaneMode\BSW,ECRAMBASE,0x10001,0xFED20100

HKLM,Software\Clevo\AirplaneMode\BWD,Bus,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\BWD,Device,0x10001,0x0000001f
HKLM,Software\Clevo\AirplaneMode\BWD,Function,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\BWD,VID_PID,0x10001,0x9CC38086
HKLM,Software\Clevo\AirplaneMode\BWD,ECRAMBASE,0x10001,0xFF700100

;1.4.0.8 add Gemini Lake
HKLM,Software\Clevo\AirplaneMode\GML,Bus,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\GML,Device,0x10001,0x0000001f
HKLM,Software\Clevo\AirplaneMode\GML,Function,0x10001,0x00000000
HKLM,Software\Clevo\AirplaneMode\GML,VID_PID,0x10001,0x31E88086
HKLM,Software\Clevo\AirplaneMode\GML,ECRAMBASE,0x10001,0xFEFF0100

[SysKeys]
HKR,,"UpperFilters",0x00010000,"mshidkmdf"

[UninstallKeys]
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\AirplaneModeHid,DisplayName,%REG_SZ%,"%AirplaneModeHid%"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\AirplaneModeHid,UninstallString,%REG_SZ%,"%16422%\%TargetDir%\uninstall.exe"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\AirplaneModeHid,DisplayVersion,%REG_SZ%,"%DriverVersion%"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\AirplaneModeHid,Publisher,%REG_SZ%,%Publisher%
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\AirplaneModeHid,URLInfoAbout,%REG_SZ%,"www.insyde.com.tw"

[DelRegistryKeys]
HKLM,"SYSTEM\CurrentControlSet\Services\AirplaneModeHid\Parameters",Initialized

;================================================================
; Configurations for Uninstall
;===============================================================

[DefaultUninstall]
DelFiles = DriverInstall, DrvPkgUninstall
DelReg = UninstallKeys, UninstallDelKeys
RunPostSetupCommands = UninstallDelDir

[UninstallDelKeys]
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\AirplaneModeHid
HKLM,SYSTEM\CurrentControlSet\Services\AirplaneModeHid
HKLM,Software\Clevo\AirplaneMode

[UninstallDelDir]
rundll32.exe advpack.dll,DelNodeRunDLL32 """%16422%\%TargetDir%""",8

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

;[DestinationDirs]
;AirplaneModeHid.Inst_CoInstaller_CopyFiles = 11

[AirplaneModeHid.Inst.amd64.NT.CoInstallers]
AddReg=AirplaneModeHid.Inst_CoInstaller_AddReg
CopyFiles=AirplaneModeHid.Inst_CoInstaller_CopyFiles

[AirplaneModeHid.Inst_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller01011.dll,WdfCoInstaller"

[AirplaneModeHid.Inst_CoInstaller_CopyFiles]
WdfCoInstaller01011.dll,,,0x00000010    ;COPYFLG_NO_OVERWRITE (for win2k)

;[SourceDisksFiles]
;WdfCoInstaller01011.dll=99 ; make sure the number matches with SourceDisksNames

[AirplaneModeHid.Inst.amd64.NT.Wdf]
KmdfService = AirplaneModeHid, RadioSwitchHidUsbFx2_wdfsect

[RadioSwitchHidUsbFx2_wdfsect]
KmdfLibraryVersion = 1.11

;===============================================================
;   Sections common to all OS versions
;===============================================================

[DriverInstall]
AirplaneModeHid.sys

[DrvPkgInstall]
AirplaneModeHid.inf
DPInst.exe
uninstall.exe

[DrvPkgUninstall]
AirplaneModeHid.inf
DPInst.exe
uninstall.exe,,,1

[AirplaneModeHid_Service_Inst]
DisplayName    = %AirplaneModeHid%
ServiceType    = 1      ;SERVICE_KERNEL_DRIVER
StartType      = 3      ;SERVICE_DEMAND_START
ErrorControl   = 0      ;SERVICE_ERROR_IGNORE
ServiceBinary  = %12%\AirplaneModeHid.sys

[Strings]
;  *******Localizable Strings*******
VENDOR           = "Insyde"
Publisher        = "Insyde Corporation"
AirplaneModeHid  = "Insyde Airplane Mode HID Mini-Driver"
DISK_NAME        = "HID Radio Switch Install Disk"
DriverVersion    = "1.4.0.8"
TargetDir        = "Insyde\AirplaneModeDriver"  ;Program file

;  *******Non Localizable Strings*******

;SERVICE_BOOT_START     = 0x0
;SERVICE_SYSTEM_START   = 0x1
;SERVICE_AUTO_START     = 0x2
;SERVICE_DEMAND_START   = 0x3
;SERVICE_DISABLED       = 0x4

;SERVICE_KERNEL_DRIVER  = 0x1
;SERVICE_ERROR_IGNORE   = 0x0
;SERVICE_ERROR_NORMAL   = 0x1
;SERVICE_ERROR_SEVERE   = 0x2
;SERVICE_ERROR_CRITICAL = 0x3

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

