@echo off
cls
echo     ===============================================
echo     =         POSTouch DOS Touch Driver           =
echo     =                Version 1.0                  =       
echo     =           I N S T A L L A T I O N           =
echo     ===============================================
echo.
if "%1" == "" goto error1
if "%2" == "" goto error1
if not exist %1\idTouch.com  goto error1
goto contin

:error1
echo To install the DOS Touchscreen driver, please specify the 
echo source path and destination path (drive and subdirectory).
echo     ===============================================
echo     =     For example:  INSTALL A: C:\POSTOUCH    =
echo     ===============================================
echo.
echo Please try again.
goto badend

:contin
md %2
echo Copy files...
copy %1\*.* %2
attrib %2\IDTOUCH.VPR -r

: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. - Call %2\idTouch /n /Im /Axxx
echo.     n=1-6(COM1~COM6), m=3~F(INT. number), xxx=Force COM port I/O address
echo CASE 2, setting by ready batch file:
echo. - CD %2
echo. - Call %2\9835C1-5.BAT
echo.     Auto setting on Nm9835 first COM (COM5).
goto okend

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

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

:end
