ECHO OFF
CLS
ECHO                          ******************************
ECHO                          *                            *
ECHO                          *  AGENTS ONLY INSTALLATION  *
ECHO                          *                            *
ECHO                          ******************************
SET DUMMY1=
ECHO 
ECHO 
ECHO 
IF NOT EXIST AOarchiv.exe GOTO AB
ECHO         Congratulations for your selection of AGENTS ONLY, the Real
ECHO         Estate Agent's Productivity Tool!
ECHO 
ECHO         The INSTALL program you are now running will create a directory
ECHO         named \AGENTS on your hard drive and copy the AGENTS ONLY files
ECHO         to it. You will be informed when installation is complete, then
ECHO         given the opportunity to start the AGENTS ONLY program.
ECHO 
ECHO         If you need to exit this INSTALL program at any time before it
ECHO         has completed, please press the ESCape key.
ECHO 
ECHO 
WHAT CE "               press any key to begin (ESC to exit) -> "
IF "%WHAT%"=="" GOTO AC
CLS
ECHO                          ******************************
ECHO                          *                            *
ECHO                          *  AGENTS ONLY INSTALLATION  *
ECHO                          *                            *
ECHO                          ******************************
ECHO 
ECHO 
ECHO 
ECHO         First, we need to know the letter of the hard drive on which to
ECHO         install AGENTS ONLY. In most cases this will be drive C, and it
ECHO         is safe for you to assume drive C if you are not sure.
ECHO 
:AA
WHAT C "        Please type the letter of your hard drive (C,D,...) -> " CDEFGH
IF "%WHAT%"=="" GOTO AC
ECHO 
ECHO 
SET TARGET=%WHAT%
SET WHAT=
WHAT K %TARGET%
IF "%WHAT%"=="" GOTO AD
WHAT KE %TARGET%
IF NOT errorlevel==150 GOTO AE
ECHO 
ECHO 
ECHO         Next, we need to know your computer's display type.
ECHO 
WHAT C "        Do you have a color monitor ? (Y/N) -> " YN
IF "%WHAT%"=="" GOTO AC
IF "%WHAT%"=="Y" SET CMD=/C
IF "%WHAT%"=="N" SET CMD=/M
CLS
ECHO         Now installing AGENTS ONLY in directory %TARGET%:\AGENTS ...
ECHO 
ECHO 
IF NOT EXIST %TARGET%:\AGENTS\*.* md %TARGET%:\AGENTS
copy what.exe     %TARGET%:\AGENTS\what.exe     /V
copy AOarchiv.exe %TARGET%:\AGENTS\AOarchiv.exe /V
%TARGET%:
cd \AGENTS
AOarchiv.exe -e -o instcont.bat
instcont.bat %TARGET% %CMD%
GOTO AF
:AB
ECHO         Sorry, we can't locate the AGENTS ONLY distribution diskette.
ECHO 
ECHO         To run the 'INSTALL' program, you must first select the floppy
ECHO         drive which contains your AGENTS ONLY diskette. To select the
ECHO         floppy drive, type the drive letter followed by a colon (:) at
ECHO         the DOS prompt, then press Enter.
ECHO 
ECHO         For example, if your AGENTS ONLY diskette is in floppy drive A,
ECHO         type the following at the DOS prompt:
ECHO 
ECHO                                 A:      (Enter)
ECHO                                 INSTALL (Enter)
ECHO 
ECHO 
PAUSE
GOTO AF
:AC
ECHO 
ECHO 
ECHO 
ECHO 
ECHO         AGENTS ONLY installation has been cancelled. Please run INSTALL
ECHO         again when you are ready to install AGENTS ONLY.
ECHO 
ECHO 
PAUSE
GOTO AF
:AD
ECHO 
ECHO         Drive %TARGET%: can not be found on your computer. Please enter the
ECHO         letter of another drive (or press ESC to exit INSTALL).
ECHO 
GOTO AA
:AE
ECHO 
ECHO 
ECHO         Drive %TARGET%: does not have enough free space.
ECHO 
ECHO         AGENTS ONLY requires approximately 1 Megabyte (1,000,000) of free
ECHO         disk space for installation of its files and 3 Megabytes free for
ECHO         various temporary files used durring its operation.
ECHO 
ECHO         Please remove other files from drive %TARGET%: to provide 4 Megabytes of
ECHO         free space and run this INSTALL program again.
ECHO 
ECHO 
PAUSE
:AF
SET TARGET=
SET WHAT=
SET CMD=
