@echo off

ECHO.
ECHO Start installing Elan touchpad driver.Please wait...
ECHO.

IF EXIST "c:\windows\sysnative\pnputil.exe" (
:Innosetup
ECHO Installing Elan SMBus Driver. Please wait...
%windir%\sysnative\PnpUtil.exe /add-driver %~dp0\ETDSMBus.inf /i
ECHO Installing Elan Miniport PTP Driver. Please wait...
%windir%\sysnative\PnpUtil.exe /add-driver %~dp0\ETDMiniPTP.inf /i
ECHO Installing Elan Keyboard Filter Device. Please wait...
%windir%\sysnative\PnpUtil.exe /add-driver %~dp0\ETD_Keyboard.inf /i
ECHO Installing Elan Input Device For WDF. Please wait...
%windir%\sysnative\PnpUtil.exe /add-driver %~dp0\ETD.inf /i
) ELSE (
:manually
ECHO Installing Elan SMBus Driver...
pnputil.exe /add-driver %~dp0\ETDSMBus.inf /i
ECHO Installing Elan Miniport PTP Driver...
pnputil.exe /add-driver %~dp0\ETDMiniPTP.inf /i
ECHO Installing Elan Keyboard Filter Device...
pnputil.exe /add-driver %~dp0\ETD_Keyboard.inf /i
ECHO Installing Elan Input Device For WDF...
pnputil.exe /add-driver %~dp0\ETD.inf /i
)

:request
ECHO.
ECHO Please restart to install driver completely!!!