clear
:Choose
echo
echo You may, if you wish, install the game to your hard
echo drive. This will require approximately 6 megabytes 
echo of free space on your hard disk, but the game will 
echo probably play faster and smoother.
echo 
echo If you do install to your hard drive, the audio data 
echo will remain on your Space Quest IV CD so you will 
echo still need to keep it in your CD drive when playing.
echo If you do not install to your hard drive, only a
echo configuration file will be saved to your hard disk. 
echo
echo Do you wish to install everything but the audio files
echo to your hard drive (y/n)?
pick yn installHD installReg

:installHD
space %1: 6000 NoSpaceBig
godir %1:%4 CantCreate
echo Installing to hard drive...
echo Copying Startup Files...
echo (Not that you care)
copy %2:*.drv
copy %2:sierra.exe
copy %2:interp.*
copy %2:version
copy %2:install.*
copy %2:resource.map
copy %2:readme.

copy %2:65535.m32

echo %3 > resource.cfg
echo audio=%2:\ >> resource.cfg
echo @echo off > %1:sq4.bat
echo sierra >> %1:sq4.bat
echo Copying Game file...
copy %2:resource.000      
goto exit

:installReg
space %1: 1 NoSpaceBig
godir %1:%4 CantCreate
echo Installing to hard drive...
echo Copying Startup Files...
echo %3 > resource.cfg
echo patchDir=%2:\ >> resource.cfg
echo audio=%2:\ >> resource.cfg
echo @echo off > %1:sq4.bat
echo %2: >> %1:sq4.bat
echo sierra %1:%4\resource.cfg >> %1:sq4.bat
echo %1: >> %1:sq4.bat

goto exit

:exit
clear
echo
echo ˙To play Space Quest IV NOW:
echo ˙   Type SQ4 [ENTER].
echo
echo ˙To play Space Quest IV LATER:
echo ˙   From %1:%4,
echo ˙   Type SQ4 and press [ENTER].
echo
pause
goto Exit2

:NoSpaceBig
clear
echo
echo There is not enough space on %1: to install. 
echo 6 megabytes of disk space are necessary.
pause
goto Exit2

:CantCreate
alert Unable to create directory %1:%4
goto Exit2

:Exit2
end
