;============================================================================ 
; Installation file (.inf) for Windows XP/Vista/7.
;
; All Rights Reserved, Copyright(C) ELAN Microelectronics Corp. 2003-2011
;============================================================================

[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
ETDCoInstaller.dll = 1

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

[ELAN.Mfg.NTamd64]
;%PS2DeviceDesc% 	= ETD_STD_Inst, *PNP0F13,*PNP0F0E,*PNP0F03,*PNP0F12,*PNP0F0B	; Hardware ID
%PS2DeviceDesc%     = ETD_STD_Inst, *ETD0000
%ELANDeviceDesc% 	= ETD_STD_Inst, *ETD0300										; Smartpad
%ELANDeviceDesc% 	= ETD_STD_Inst, *ETD0301										; Clickpad
%ELANDeviceDesc% 	= ETD_STD_Inst, *ETD0302										; Hitachi - Smartpad

[ELAN.Mfg.NTamd64.6.2]
;%PS2DeviceDesc% 	= ETD_STD_Inst, *PNP0F13,*PNP0F0E,*PNP0F03,*PNP0F12,*PNP0F0B	; Hardware ID
%PS2DeviceDesc%     = ETD_STD_Inst, *ETD0000
%ELANDeviceDesc% 	= ETD_STD_Inst, *ETD0300										; Smartpad
%ELANDeviceDesc% 	= ETD_STD_Inst, *ETD0301										; Clickpad
%ELANDeviceDesc% 	= ETD_STD_Inst, *ETD0302										; Hitachi - Smartpad

[ELAN.Mfg.NTamd64.6.3]
;%PS2DeviceDesc% 	= ETD_STD_Inst, *PNP0F13,*PNP0F0E,*PNP0F03,*PNP0F12,*PNP0F0B	; Hardware ID
%PS2DeviceDesc%     = ETD_STD_Inst, *ETD0000
%ELANDeviceDesc% 	= ETD_STD_Inst, *ETD0300										; Smartpad
%ELANDeviceDesc% 	= ETD_STD_Inst, *ETD0301										; Clickpad
%ELANDeviceDesc% 	= ETD_STD_Inst, *ETD0302										; Hitachi - Smartpad
;----------------------------------------------------------------------------
; Install Sections
;----------------------------------------------------------------------------

[DestinationDirs]
DefaultDestDir 		= 12			; Driver directory
ETDSys.CopyFiles 	= 12			; Driver directory
ETDCoInstaller.CopyFiles = 11

[ETD_Service_Inst]
DisplayName    = %PS2DeviceDesc%
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

;----------------------------------------------------------------------------
; PS/2 SmartPad
;----------------------------------------------------------------------------
[ETD_STD_Inst]
Include=msmouse.inf
Needs=PS2_Inst
CopyFiles=ETDSys.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,%ServiceRoot%"\Elantech
;HKLM,%ServiceRoot%"\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,%ServiceRoot%"\Elantech",InstallDir,%REG_SZ%,"%1%"
HKLM,%ServiceRoot%"\Elantech",DriverVersion,%REG_SZ%,"ETDWare PS/2-%DriverBit% %DriverVersion%_%DriverVersionExtend%"
HKLM,%ServiceRoot%"\Elantech",ScreenOrientation,%REG_DWORD%,0

; Windows\CurrentVersion\Uninstall
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\Elantech,DisplayName,%REG_SZ%,"ETDWare PS/2-%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

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

[Strings]
Publisher 			= "ELAN Microelectronic Corp."
PS2DeviceDesc 		= "ELAN PS/2 Port Input Device"
ELANDeviceDesc 		= "ELAN PS/2 Port Smart-Pad"
ELANHIDDeviceDesc 	= "ELAN HID Input Device"
TargetDir			= "Elantech"
DiskName  			= "ETDWare Driver Disk"
VenderName			= "ELAN"
;ServiceRoot 		= "System\CurrentControlSet\Services"
ServiceRoot 		= "System\CurrentControlSet\Control"

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

; ELAN Driver Information
ELANStringName		= "ELAN Input Device Driver"
ThinkPadStringName	= "ThinkPad UltraNav Driver"
LenovoStringName	= "Lenovo pointing device"
DriverDate			= "10/04/2013"
DriverVersion		= "11.13.5.3"
DriverBit			= "X64"
DriverVersionExtend	= "WHQL"        ; Beta or WHQL
