echo off
if '%1'=='' goto NoParam
batext %1
if errorlevel 99 goto NoDrive
if errorlevel 1 goto MakeDir
if errorlevel 0 goto DirOK
:NoDrive
echo The drive %1 does not exist!  Please try again.
goto Abort
:MakeDir
echo Creating directory %1
mkdir %1
:DirOk
cls
echo ARCANUM Computing Installation
echo ------------------------------
echo Select program to install by number:
echo  1) Dragons Bane complete installation (requires 3M free disk space)
echo  2) Dragons Bane only
echo  3) Tile Factory only
echo  4) View READ.ME file for more information
echo  5) View Arcanum Computing catalog
echo  6) Abort installation
echo ------------------------------
batext
if errorlevel 6 goto Abort
if errorlevel 5 goto Catalog
if errorlevel 4 goto View
if errorlevel 3 goto Install3
if errorlevel 2 goto Install2
if errorlevel 1 goto Install1
goto Abort
:Catalog
catalog.exe
goto Abort
:View
view.exe read.me
goto Abort
:Install1
echo Installing Dragons Bane and Tile Factory to %1
main.exe %1
tiles.exe %1
pics.exe %1
copy view.exe %1
copy catalog.exe %1
copy read.me %1
echo.
echo Please enter the name of the person who is the registered owner of this
echo copy of Dragons Bane: Mah Jongg II
batext REGISTER %1\dragon.reg
batext cd %1
echo Installation complete.  Type 'dragon' to run.
goto Abort
:Install2
echo Installing Dragons Bane (minimal installation) to %1
main.exe %1
pics.exe %1
copy view.exe %1
echo.
echo Please enter the name of the person who is the registered owner of this
echo copy of Dragons Bane: Mah Jongg II
batext REGISTER %1\dragon.reg
batext cd %1
echo Installation complete.  Type 'dragon' to run.
goto Abort
:Install3
echo Installing Tile Factory to %1
tiles.exe %1
copy view.exe %1
batext cd %1
echo Installation complete.  Type 'factory' to run.
goto Abort
:NoParam
echo -----------------------------------------------------------------------
echo You need to specify where you want the program installed.  For example,
echo    INSTALL A:
echo will install it on your A: drive, or
echo    INSTALL C:\GAMES
echo will install to the \games directory on your C: drive.
echo Try again...
:Abort
