@ECHO OFF
IF "%1"=="" GOTO BadArg
:PartTwo
%1
IF NOT EXIST %1.\yeager.exe GOTO BadArg
IF "%2"=="" GOTO BadArg
:PartThree
%2
COPY %1.\install.bat %2\t~est.t~t>nul
IF NOT EXIST %2\t~est.t~t GOTO BadArg
DEL %2\t~est.t~t>nul
rem this just tested to see if %2 was a valid write-enabled drive.
ECHO ***************************************************************************
ECHO *                                                                         *
ECHO *    You have asked to install Chuck Yeager's Air Combat from             *
ECHO *    drive %1 to drive %2.                                                *   
ECHO *                                                                         *
ECHO *    If this is incorrect, press CTRL-C or CTRL-BREAK and answer Y to     *
ECHO *    cancel the installation.  Otherwise, press any other key to          *
ECHO *    continue.                                                            *
ECHO *                                                                         *
ECHO ***************************************************************************
PAUSE
CLS
ECHO Now copying files; please wait...
IF NOT EXIST %2\YEAGER\*.* MD %2\YEAGER
COPY %1.\*.* %2\YEAGER>nul
CD \YEAGER
IF NOT EXIST %2\YEAGER\4A.LIB GOTO BadInst
rem test to see if the last file was really copied
del install.bat>nul
CLS
ECHO ***************************************************************************
ECHO *                                                                         *
ECHO *    Chuck Yeager's Air Combat has been successfully copied to %2\YEAGER  *
ECHO *    Type YEAGER to run the simulation.                                   *
ECHO *                                                                         *
ECHO ***************************************************************************
GOTO End
:BadArg
ECHO ***************************************************************************
ECHO *                                                                         *
ECHO *    To install Chuck Yeager's Air Combat from drive d: to hard drive c:, *
ECHO *    change to the d: drive and type:                                     *
ECHO *                                                                         *
ECHO *                                 CD\YEAGER                               *
ECHO *                                                                         *
ECHO *                                 INSTALL D: C:                           *
ECHO *                                                                         *
ECHO *    If your drives have different identifiers, please use the drive      *
ECHO *    letters appropriate for your system; for example, if you are         *
ECHO *    installing from drive e: to hard drive d: you would                  *
ECHO *    change to drive e: and type:                                         *
ECHO *                                                                         *
ECHO *                                 CD\YEAGER                               *
ECHO *                                                                         *
ECHO *                                 INSTALL E: D:                           *
ECHO *                                                                         *
ECHO ***************************************************************************
goto End
:BadInst
ECHO ***************************************************************************
ECHO *                                                                         *
ECHO *   There was a problem with the install. Do you have 1,400,000 bytes     *
ECHO *   free space?  You can type CHKDSK [drive letter]: to find out how      *
ECHO *   much free space you have. e.g. CHKDSK D:                              *
ECHO *                                                                         *
ECHO *   Please read your manual section about installing Chuck Yeager or you  *
ECHO *   can contact our customer service department if you have problems.     *
ECHO *                                                                         *
ECHO ***************************************************************************
goto End
:End
