cls
@echo off
rem %1 = source
rem %2 = destination
md %2\trekdemo
%2
cd trekdemo
xcopy %1 %2 
if errorlevel 5 goto baddisk
if errorlevel 4 goto nomemory
if errorlevel 2 goto abort
if errorlevel 1 goto nofiles
if errorlevel 0 goto finished

:baddisk
cls
echo Disk write error.
echo Delete the \TREKDEMO directory and run MS DOS CHECKDISK.
goto exit

:nomemory
cls
echo Installation error occurred - Please check the following:
echo 1) At least 7 megabytes of free Hard disk space.
echo 2) Syntax error - 
echo    Type DOSINST (CD-ROM drive letter) (Hard disk drive letter)
echo    from the root directory of your CD-ROM drive.
echo    Example: DOSINST D: C:
echo 3) Either the CD-ROM drive letter or the Hard disk drive letter 
echo    is incorrect. Make sure the CD-ROM drive and Hard disk
echo    drive letters are correct.
goto exit

:abort
cls
echo Installation terminated by user.
goto exit

:nofiles
cls
echo Could not find source files. Make sure you are in the TREKDEMO
echo directory of your CD-ROM drive.
goto exit

:finished
cls
echo Installation successful!
echo You can now launch Windows and run the demo.
goto exit

:exit


