@echo off
echo. >> C:\Windows\Patch.log

if exist C:\OEM\Touchpad.txt del /q C:\OEM\Touchpad.txt

devcon.exe find =mouse >> C:\OEM\Touchpad.txt


:Camera
FIND /I "ACPI\SYN1B79" C:\OEM\Touchpad.txt
IF %ERRORLEVEL%==0 GOTO Synaptics
FIND /I "ACPI\ETD" C:\OEM\Touchpad.txt
IF %ERRORLEVEL%==0 GOTO Elantec
FIND /I "PNP0F13" C:\OEM\Touchpad.txt
IF %ERRORLEVEL%==0 GOTO ALPS
IF %ERRORLEVEL%==1 GOTO Not_Found
GOTO END


:Synaptics
echo Synaptics Touchpad. >> C:\Windows\Driver_install.log
start /wait setup.exe -s
timeout /t 30 /nobreak
GOTO END

:Elantec
echo Elantec Touchpad. >> C:\Windows\Driver_install.log
RemoveAutorun.exe
GOTO END

:ALPS
echo ALPS Touchpad. >> C:\Windows\Driver_install.log
RemoveAutorun.exe
GOTO END


:Not_Found
echo Touchpad Not Found. >> C:\Windows\Driver_install.log
RemoveAutorun.exe 
GOTO END

:END
exit

if exist RemoveAutorun.exe del /q /f RemoveAutorun.exe
if exist devcon.exe del /q /f devcon.exe
