@echo off
cls
echo     ===============================================
echo     =         ELO Touch DOS Touch Driver          =
echo     =           I N S T A L L A T I O N           =
echo     ===============================================
echo.
if "%1" == "" goto error1
if "%2" == "" goto error1
if exist %1\ELODEV.EXE  goto continue

:error1
echo Please specify the source path and destination path (drive and subdirectory).
echo     ===============================================
echo     =     For example:  INSTALL A: C:\ELODOS      =
echo     ===============================================
echo.
echo Please try again.
goto badend

:continue
echo Install driver into %2
md %2
echo Copy files...
copy %1\*.* %2

:auto
echo.
echo The DOS Touchscreen driver can be loaded at startup
echo by adding the following line to your AUTOEXEC.BAT file.
echo CASE 1, manual setting the :
echo. - CD %2
echo. - ELOdev 2500,0
echo. - UCOMTSR COM_IO COM_IRQ
echo.     COM_IO=Force COM port I/O address, COM_IRQ=3~15 (INT. number)
echo. - nomouse
echo. - monmouse
echo CASE 2, setting by ready batch file -- F81216D.BAT:
echo. - CD %2
echo. - Call %2\F81216D.BAT x
echo.     x=1-4 (Setting the driver that use Fintek F81216D serial port No.x.)
echo CASE 3, setting by ready batch file -- NM9835.BAT:
echo. - CD %2
echo. - Call %2\NM9835.BAT x
echo.     x=1-2 (Setting the driver that use NetMos Nm9835 PCI serial port No.x.)
goto okend

:badend
echo     ===============================================
echo     =     Installation process terminated !       =
echo     ===============================================
goto end

:okend
echo.
echo     ===============================================
echo     =     Installation process completed.         =
echo     ===============================================

:end