echo off
if .%2 == .~ goto tc
if "%1" == "" goto def
if "%1" == "a:" goto bd
if "%1" == "A:" goto bd
if "%1" == "b:" goto bd
if "%1" == "B:" goto bd
if exist %1\diehard\die.exe goto gotit
if exist %1\diehard\install.bat goto D1
cls
echo                              DIE HARD 
echo                       HARD DISK INSTALLATION
echo     A directory will be created on the %1 drive called DIEHARD. 
echo             To exit the installation process hit CTRL-C.
pause
if "%1" == "c:" goto b
if "%1" == "C:" goto b
if "%1" == "d:" goto b
if "%1" == "D:" goto b
if "%1" == "e:" goto b
if "%1" == "E:" goto b
if "%1" == "f:" goto b
if "%1" == "F:" goto b
goto nod
:b   
if not exist diehard.bat goto dr
if not exist %1\diehard md %1\diehard
if exist %1\diehard\install.bat goto D1
copy install.bat %1\diehard
%1\diehard\install %1
:tc
:D1
cls        
echo Insert DIE HARD disk #1 in the disk drive.
echo If installing from the Die Hard 3 1/2 disk, insert the disk now.
pause 
cls 
echo Copying files to %1\DIEHARD.
mkdir %1\diehard\bitmaps
mkdir %1\diehard\screens
mkdir %1\diehard\sounds
mkdir %1\diehard\vm
mkdir %1\diehard\worlds
copy *.* %1\diehard
copy bitmaps\*.bmp %1\diehard\bitmaps
copy screens\pics1*.* %1\diehard\screens
copy sounds\*.* %1\diehard\sounds
copy vm\*.* %1\diehard\vm
copy worlds\final*.* %1\diehard\worlds
if not exist %1\diehard\screens\pics1*.* goto Iner
if not exist %1\diehard\die.exe goto Iner
:D2
cls
echo Insert Die Hard disk #2 in the disk drive.
echo If installing from the Die Hard 3 1\2 disk simply hit any key.
pause
cls       
echo Copying files to %1\DIEHARD.
if not exist disk2.bat goto D2
copy bitmaps\bits.blk %1\diehard\bitmaps
copy screens\pics2*.* %1\diehard\screens
copy worlds\wor*.* %1\diehard\worlds
copy worlds\shap*.* %1\diehard\worlds
if not exist %1\diehard\bitmaps\bits.blk goto Iner
if not exist %1\diehard\screens\pics2*.* goto Iner
:indon
%1
cd %1\diehard
cls       
echo Die Hard is now intalled on %1 
echo Type "DIEHARD" to run the game.
goto end
:bd
cls     
echo Error: Cannot install to that drive!
goto nod
:def
cls       
echo Error: Use "INSTALL drive:" to install DIE HARD
echo For example, if your hard drive is labelled 'C:',
echo then type "install c:". Make sure a colon is used after the 
echo drive letter.
goto done
:nod  
echo Error: The hard drive must be a letter from C: to F:.
goto done
:Iner
cls    
echo Error: This error might be caused by...
echo    A) Insufficient hard disk space (720k is required).
echo    B) Damaged or missing files.
echo    C) Trying to install to a nonexistant drive.
goto delit 
goto done
:gotit
cls     
echo DIE HARD already exists on this drive.  
goto delit
:delit
echo Delete the DIEHARD directory and all files in it before 
echo trying to install DIE HARD again (including sud-directories).
goto done
:dr
cls   
echo Error: Please run installation from the original disk.
goto done
:done  
echo DIE HARD was not installed correctly. 
:end
