echo off
cls
set X=ABDEFGHIJKLMNOPQRSTUVWXYZ0123456789
if not (%X%) == (ABDEFGHIJKLMNOPQRSTUVWXYZ0123456789) goto noenv
set X=
if not (%1) == () goto %1
:a
:A
a:
if exist ayenay.exe goto thinkina
:b
:B
b:
if exist ayenay.exe goto thinkinb
goto notfound

:thinkina
set Z=A:
goto intro

:thinkinb
set Z=B:

:intro
ayenay Is the SEAmail "START HERE" disk in drive %Z% on your system?
if errorlevel 1 goto dskinz

:notfound
echo The SEAmail "START HERE" disk must be in drive A: or B: for this
echo installation procedure to work properly.  Please put the SEAmail
echo "START HERE" disk  in drive A: or drive B: and try again.
goto alldone

:noenv
cls
echo You do not have enough environment space for this installation to 
echo work.  Please locate a computer guru who can give your system more
echo environment space.
goto alldone

:dskinz
ayenay Do you want to install SEAmail on your system?
if errorlevel 1 goto doit

echo .
echo I won't install SEAmail on your system at this time.  Please repeat the
echo installation procedure when you are ready to install SEAmail.
goto alldone

:doit
ayenay Do you have a fixed disk?
if errorlevel 1 goto fixed
echo .
echo I'm sorry, but you must have a fixed disk in order to install SEAmail.
echo Please return your disk and manual for a refund.
echo .
goto alldone

:fixed
whichdsk 2048 290
set X=A
if errorlevel  1 set X=B
if errorlevel  2 set X=C
if errorlevel  3 set X=D
if errorlevel  4 set X=E
if errorlevel  5 set X=F
if errorlevel  6 set X=G
if errorlevel  7 set X=H
if errorlevel  8 set X=I
if errorlevel  9 set X=J
if errorlevel 10 set X=K
if errorlevel 11 set X=L
if errorlevel 12 set X=M
if errorlevel 13 set X=N
if errorlevel 14 set X=O
if errorlevel 15 set X=P
if errorlevel 16 set X=Q
if errorlevel 17 set X=R
if errorlevel 18 set X=S
if errorlevel 19 set X=T
if errorlevel 20 set X=U
if errorlevel 21 set X=V
if errorlevel 22 set X=W
if errorlevel 23 set X=X
if errorlevel 24 set X=Y
if errorlevel 25 set X=Z
if errorlevel 26 goto alldone
%X%:
set SEAmail=%X%:\SEAMAIL
set X=
if not exist %SEAmail%\*.* md %SEAmail%
cd %SEAmail%
if exist %Z%syscfg.sea copy %Z%syscfg.sea
if exist %Z%task.com   copy %Z%task.com
if exist %Z%ayenay.exe copy %Z%ayenay.exe
copy %Z%install2.bat
install2

:adios
if exist install2.bat del install2.bat
if exist ayenay.exe   del ayenay.exe
set Z=
cls

echo That finishes the installation procedure.  SEAmail is now installed on your
echo system.  You may wish to customize things a bit.  Please refer to the SEAmail
echo manual for complete details on how a SEAmail mail system is installed and
echo modified.  Thank you.

:alldone
