;============================================================================ 
; Installation file (.inf) for Windows 7/8/8.1
;
; All Rights Reserved, Copyright(C) ELAN Microelectronics Corp. 2003-2014
;============================================================================

[Version]
Signature="$Windows NT$"
Provider=%VenderName%
ClassGUID={4D36E96F-E325-11CE-BFC1-08002BE10318}
Class=Mouse
CatalogFile=ETD.cat
DriverVer=%DriverDate%, %DriverVersion%

[SourceDisksNames]
1=%DiskName%,,

[SourceDisksFiles]
ETD.sys 	= 1
ETDCtrl.exe 	= 1
ETDApix.dll 	= 1
ETDCmds.dll 	= 1
ETDUninst.dll 	= 1
ETDUn_inst.exe 	= 1
ETDMcpl.dll 	= 1
ETDApi.dll 	= 1
ETDFavorite.dll = 1
;ETDFingerPositioner.exe 	= 1
;ETDHValueMonitor.exe 		= 1
ETDDeviceInformation.exe 	= 1
ETDCtrlHelper.exe 		= 1
ETD_DLL.dll 	= 1
ETDApi32.dll 	= 1
ETDAniConf.exe 	= 1
ETDService.exe 	= 1
ETDTouch.exe 	= 1
ETDCoInstaller.dll = 1

;----------------------------------------------------------------------------
; Manufacturer Sections
;----------------------------------------------------------------------------

[Manufacturer]
%VenderName%   = ELAN.Mfg, NTamd64, NTamd64.6.2, NTamd64.6.3

[ELAN.Mfg.NTamd64]
;%PS2.ELANDeviceDesc% 		= ETD_STD_Inst, *PNP0F13,*PNP0F0E,*PNP0F03,*PNP0F12,*PNP0F0B						; Compatible ID
%PS2.ELANDeviceDesc% 		= ETD_STD_Inst, *ETD0000										; Compatible ID
%PS2.ELANDeviceDesc% 		= ETD_STD_Inst, *ETD0701										; SmartPad for Inventec
%PS2.ELANDeviceDesc% 		= ETD_STD_Inst, *ETD0702										; ClickPad for Inventec

[ELAN.Mfg.NTamd64.6.2]
;%PS2.ELANDeviceDesc% 		= ETD_STD_Inst, *PNP0F13,*PNP0F0E,*PNP0F03,*PNP0F12,*PNP0F0B						; Compatible ID
%PS2.ELANDeviceDesc% 		= ETD_STD_Inst, *ETD0000										; Compatible ID
%PS2.ELANDeviceDesc% 		= ETD_STD_Inst, *ETD0701										; SmartPad for Inventec
%PS2.ELANDeviceDesc% 		= ETD_STD_Inst, *ETD0702										; ClickPad for Inventec

[ELAN.Mfg.NTamd64.6.3]
;%PS2.ELANDeviceDesc% 		= ETD_STD_Inst, *PNP0F13,*PNP0F0E,*PNP0F03,*PNP0F12,*PNP0F0B						; Compatible ID
%PS2.ELANDeviceDesc% 		= ETD_STD_Inst, *ETD0000										; Compatible ID
%PS2.ELANDeviceDesc% 		= ETD_STD_Inst, *ETD0701										; SmartPad for Inventec
%PS2.ELANDeviceDesc% 		= ETD_STD_Inst, *ETD0702										; ClickPad for Inventec

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

[DestinationDirs]
DefaultDestDir 		= 12			; Driver directory
ETDSys.CopyFiles 	= 12			; Driver directory
ETDApp.CopyFiles 	= 16422, %TargetDir%	; Program file
ETDCoInstaller.CopyFiles = 11		; System directory

[ETD_Service_Inst]
DisplayName    = %PS2.DeviceDesc%
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 0                  ; SERVICE_ERROR_IGNORE
ServiceBinary  = %12%\ETD.sys
LoadOrderGroup = Pointer Port

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

[ETDSys.CopyFiles]
ETD.sys,,,0x00000001

[ETDCoInstaller.CopyFiles]
ETDCoInstaller.dll,,,0x10

[ETDApp.CopyFiles]
ETDCtrl.exe
ETDApix.dll
ETDCmds.dll
ETDUninst.dll
ETDUn_inst.exe
ETDMcpl.dll
ETDApi.dll
ETDAniConf.exe
ETDFavorite.dll
;ETDFingerPositioner.exe
;ETDHValueMonitor.exe
ETDDeviceInformation.exe
ETDCtrlHelper.exe
ETD_DLL.dll
ETDService.exe
ETDApi32.dll
ETDTouch.exe

[ETD_STD_Inst]
Include=msmouse.inf
Needs=PS2_Inst
CopyFiles=ETDSys.CopyFiles,\
		  ETDApp.CopyFiles
AddReg=ETD_System.AddReg
	   
[ETD_STD_Inst.Services]
Include=msmouse.inf
Needs=PS2_Inst.Services
AddService = ETD,0x00000000, ETD_Service_Inst

[ETD_STD_Inst.CoInstallers]
AddReg    = ETDCoInstaller.AddReg
CopyFiles = ETDCoInstaller.CopyFiles

[ETD_STD_Inst.HW]
AddReg = ETD_AddReg.HW

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

[ETD_AddReg.HW]
HKR,,"UpperFilters",0x00010000,"ETD"
[ETDCoInstaller.AddReg]
HKR,,CoInstallers32,0x10000,"ETDCoInstaller.DLL,CoInstallerEntry"

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

[Uninstall]
CopyFiles = No_Files
DelFiles = No_Files
DelReg = Uninstall_DelReg

[No_Files]

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

[Uninstall_DelReg]
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\Elantech
HKCR,CLSID\{0066D4B3-8DE0-4D08-AA83-EDD50E2431F0}
HKLM,"Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved",{0066D4B3-8DE0-4D08-AA83-EDD50E2431F0}
HKLM,"Software\Microsoft\Windows\CurrentVersion\Controls Folder\Mouse\shellex\PropertySheetHandlers\ETD"
HKLM,Software\Microsoft\Windows\CurrentVersion\Run,ETDCtrl
HKLM,%HKLMRootPath%"\Elantech
;HKLM,%HKLMRootPath%"\ETD
HKCU,Software\Elantech

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

[ETD_System.AddReg]
HKCR,CLSID\{0066D4B3-8DE0-4D08-AA83-EDD50E2431F0}\InProcServer32,,%REG_EXPAND_SZ%,"%ProgramFiles%\%TargetDir%\ETDMcpl.dll"
HKCR,CLSID\{0066D4B3-8DE0-4D08-AA83-EDD50E2431F0}\InProcServer32,ThreadingModel,%REG_SZ%,"Apartment"
HKLM,"Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved",{0066D4B3-8DE0-4D08-AA83-EDD50E2431F0},%REG_SZ%,"ELAN Control Panel"

HKLM,"Software\Microsoft\Windows\CurrentVersion\Controls Folder\Mouse\shellex\PropertySheetHandlers\ETD",,%REG_SZ%,"{0066D4B3-8DE0-4D08-AA83-EDD50E2431F0}"
HKLM,Software\Microsoft\Windows\CurrentVersion\Run,ETDCtrl,%REG_EXPAND_SZ%,"%ProgramFiles%\%TargetDir%\ETDCtrl.exe"

HKLM,%HKLMRootPath%"\Elantech",InstallDir,%REG_SZ%,"%1%"
HKLM,%HKLMRootPath%"\Elantech",Version,%REG_SZ%,"%DriverVersion%"
HKLM,%HKLMRootPath%"\Elantech",DriverVersion,%REG_SZ%,"ETDWare %DriverBit% %DriverVersion%_%DriverVersionExtend%"
HKLM,%HKLMRootPath%"\Elantech",ScreenOrientation,%REG_DWORD%,0

; Windows\CurrentVersion\Uninstall
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\Elantech,DisplayName,%REG_SZ%,"ETDWare %DriverBit% %DriverVersion%_%DriverVersionExtend%"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\Elantech,UninstallString,%REG_EXPAND_SZ%,"%ProgramFiles%\%TargetDir%\ETDUn_inst.exe"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\Elantech,DisplayVersion,%REG_SZ%,"%DriverVersion%"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\Elantech,DisplayIcon,%REG_EXPAND_SZ%,"%ProgramFiles%\%TargetDir%\ETDCtrl.exe"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\Elantech,Publisher,%REG_SZ%,%Publisher%
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\Elantech,URLInfoAbout,%REG_SZ%,"www.emc.com.tw"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\Elantech,NoModify,%REG_DWORD%,1
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\Elantech,NoRepair,%REG_DWORD%,1

HKLM,"%HKLMRootPath%\Elantech\SmartPad",Tap3_Press_Path,%REG_SZ%,"%24%\Program Files\Internet Explorer\iexplore.exe"
;----------------------------------------------------------------------------
; String Table
;----------------------------------------------------------------------------
[Strings]
Publisher 		= "ELAN Microelectronic Corp."
PS2.DeviceDesc 		= "ELAN Touchpad"
PS2.ELANDeviceDesc 	= "ELAN Smart-Pad"
PS2ToHID.ELANDeviceDesc = "ELAN HID Smart-Pad"
TargetDir		= "Elantech"
DiskName  		= "ETDWare Driver Disk"
VenderName		= "ELAN"
HKLMRootPath 		= "System\CurrentControlSet\Control"

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

; Driver Information Entries
ELANStringName		= "ELAN Input Device Driver"

DriverDate		= "03/28/2014"
DriverVersion		= "11.2.3.2"
DriverBit		= "X64"
DriverVersionExtend	= "WHQL"        ; Beta or WHQL
