clear
godir %1:%4 cantcreate

clear
space %1: 500 nospace

echo Copying files to %1:%4 ...
echo @echo off >..\sq6demo.bat
echo cd %4 >>..\sq6demo.bat

echo call CheckCD   %2 >>..\sq6demo.bat

echo vesatest.exe >>..\sq6demo.bat
echo if errorlevel == 1 goto noVesa >>..\sq6demo.bat

echo %2: >>..\sq6demo.bat
echo sierra %1:%4\resource.cfg >>..\sq6demo.bat
echo goto end >>..\sq6demo.bat

echo :noVesa >> ..\sq6demo.bat
echo echo A VESA driver was not found on your system. Please rerun install >>..\sq6demo.bat
echo echo and check the readme file for help on installing a VESA driver. >>..\sq6demo.bat

echo :end >>..\sq6demo.bat
echo %1: >>..\sq6demo.bat
echo cd .. >>..\sq6demo.bat

echo @echo off >sq6demo.bat
echo call CheckCD   %2 >>sq6demo.bat

echo vesatest.exe >>sq6demo.bat
echo if errorlevel == 1 goto noVesa >>sq6demo.bat

echo %2: >>sq6demo.bat
echo sierra %1:%4\resource.cfg >>sq6demo.bat
echo goto end >>sq6demo.bat

echo :noVesa >>sq6demo.bat
echo echo A VESA driver was not found on your system. Please rerun install >>sq6demo.bat
echo echo and check the readme file for help on installing a VESA driver. >>sq6demo.bat

echo :end >>sq6demo.bat
echo %1: >>sq6demo.bat

echo %3 >resource.cfg

clear
echo resAUD=%2:   >> resource.cfg
echo resSFX=%2: >> resource.cfg
echo patchDir=%1:%4;%2:;%2:\AVI >>resource.cfg
copy %2:sqcheck.bat %1:checkcd.bat
copy %2:vesatest.exe %1:vesatest.exe
copy %2:install.exe %1:
copy %2:install.scr %1:
copy %2:install.txt %1:
copy %2:install.hlp %1:
copy %2:*.drv %1:
rem copy %2:\patches\*.* %1: /q
copy %2:version %1:

cd ..
cls
echo
echo ˙To play the Space Quest 6 demo now:
echo ˙   At the DOS prompt, 
echo      type sq6demo and press [ENTER].
echo
echo ˙To play the Space Quest 6 demo later:
echo ˙   From the directory of %1:%4,
echo ˙   Type sq6demo and press [ENTER].
echo
pause
goto quit

:cantcreate
alert Unable to create directory %1:%4
pause
goto quit

:nospace
cls
echo
echo There is not enough space on %1: to install. 
echo At least 1 Megabyte of disk space is necessary for
echo installing the game.
echo
pause

:quit
end

