@ECHO OFF

REM install.bat
REM Use to install or update the PHONE Program

REM Date........: 11/11/90
REM Revised.....: 11/25/90, 02/23/91, 06/18/91, 09/22/91, 11/29/91
REM               06/02/92
REM Author......: Jeff Morris
REM Copyright...: (c) Vision Computing, Inc.

IF NOT EXIST PHONE301.EXE GOTO NOEXE

CLS
ECHO:
ECHO                          PHONE Program Installation
ECHO:
ECHO:
ECHO    ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
ECHO    º Press NUMBER to indicate which Drive to use for temporary workfiles. º
ECHO    º (Must have at approx. 1 MB disk space free on that drive.)           º
ECHO    º                                                                      º
ECHO    º   1) "C:"      2) "D:"      3) EXIT the install program              º
ECHO    ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
ECHO:  
REPLY

IF ERRORLEVEL 51 GOTO END
IF ERRORLEVEL 50 GOTO DDRIVE
IF ERRORLEVEL 49 GOTO CDRIVE
GOTO END

:CDRIVE
REM test to be sure C: is a valid drive
if not exist c:\nul goto nodrive

ECHO:
ECHO      Copying files to temporary directory "C:\PHONE.INS"

REM test, just in case the dir is there, possibly from an earlier install
if not exist C:\phone.ins\nul MD C:\phone.ins

COPY *.* C:\phone.ins\*.* >NUL
C:
CD \PHONE.INS
ECHO:
ECHO      Expanding compressed files ... Please wait...
PHONE301 >NUL
PHONE INSTALL
REM Get rid of temporary files and directory
REM Note: If installed on a different drive, these files may need to
REM       be manually deleted.
ECHO:
ECHO    ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
ECHO    º                     Removing temporary workfiles                     º
ECHO    ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
ECHO:  
DEL C:\phone.ins\p*.* >NUL
DEL C:\phone.ins\c*.* > NUL
DEL C:\phone.ins\*.m* > NUL
DEL C:\phone.ins\readme > NUL
DEL C:\phone.ins\install.bat >Nul
DEL C:\phone.ins\reply.com >NUL
RD C:\phone.ins >NUL
GOTO END

:DDRIVE
REM test to be sure D: is a valid drive
if not exist d:\nul goto nodrive

ECHO:
ECHO      Copying files to temporary directory "D:\PHONE.INS"

if not exist D:\phone.ins\nul MD D:\phone.ins

COPY *.* D:\PHONE.INS\*.* >NUL
D:
CD \PHONE.INS
ECHO:
ECHO      Expanding compressed files ... Please wait
PHONE301 >NUL
PHONE INSTALL
REM Get rid of temporary files and directory
REM Note: If installed on a different drive, these files may need to
REM       be manually deleted.
ECHO:
ECHO    ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
ECHO    º                     Removing temporary workfiles                     º
ECHO    ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
ECHO:  
DEL D:\phone.ins\p*.* >NUL
DEL D:\phone.ins\c*.* > NUL
DEL D:\phone.ins\*.m* > NUL
DEL D:\phone.ins\readme > NUL
DEL D:\phone.ins\install.bat >NUL
DEL D:\phone.ins\reply.com >NUL
RD D:\phone.ins >NUL
GOTO END

:NOEXE
ECHO:
ECHO      The PHONE301.EXE file must be in the same directory where
ECHO      install.bat is run from. Press any key to quit.
ECHO:
REPLY
GOTO END

:NODRIVE
ECHO:
ECHO      Invalid Drive! - Try to install again with a correct drive
ECHO      OR - see the README file to start installation manually.
ECHO:
ECHO      Press any key to quit.
ECHO:
REPLY
GOTO END

:END
CLS
