@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, 07/28/93, 12/19/93, 12/29/94, 01/14/95
REM               04/01/95, 08/09/95, 11/10/95
REM Author......: Jeff Morris
REM Copyright...: (c) Vision Computing, Inc.

IF NOT EXIST PHONE330.EXE GOTO NOEXE

CLS
ECHO:
ECHO                          PHONE Program Installation
ECHO:
ECHO    ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
ECHO    Ί Press NUMBER to indicate Drive to use for temporary install files.   Ί
ECHO    Ί       (Must have approx. 8 MB disk space free on that drive.)        Ί
ECHO    Ί       (Plus approx. 6 MB free on Drive PHONE will install to)        Ί
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:\PHONEINS"

REM test, just in case the dir is there, possibly from an earlier install
if not exist C:\phoneins\nul MD C:\phoneins

COPY *.* C:\phoneins\*.* >NUL
C:
CD \PHONEINS
ECHO:
ECHO      Expanding compressed files ... Please wait...
PHONE330 >NUL
REM need to test if all files were copied. If not, probally no room on drive
if not exist usazip.ntx goto NOROOM
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:
REM for newer DOS versions, could just say DELTREE
DEL C:\phoneins\p*.* >NUL
DEL C:\phoneins\c*.* >NUL
DEL C:\phoneins\*.m* >NUL
DEL C:\phoneins\readme >NUL
DEL C:\phoneins\install.bat >NUL
DEL C:\phoneins\reply.com >NUL
DEL C:\phoneins\file_id.diz >NUL
DEL C:\phoneins\*.dic >NUL
DEL c:\phoneins\usazip.* >NUL
RD C:\phoneins >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:\PHONEINS"

if not exist D:\phoneins\nul MD D:\phoneins

COPY *.* D:\PHONEINS\*.* >NUL
D:
CD \PHONEINS
ECHO:
ECHO      Expanding compressed files ... Please wait
PHONE330 >NUL
if not exist usazip.ntx goto NOROOM
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:\phoneins\p*.* >NUL
DEL D:\phoneins\c*.* >NUL
DEL D:\phoneins\*.m* >NUL
DEL D:\phoneins\readme >NUL
DEL D:\phoneins\install.bat >NUL
DEL D:\phoneins\reply.com >NUL
DEL D:\phoneins\file_id.diz >NUL
DEL D:\phoneins\*.dic >NUL
DEL D:\phoneins\usazip.* >NUL
RD D:\phoneins >NUL
GOTO END

:NOEXE
ECHO:
ECHO      The PHONE330.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

:NOROOM
ECHO:
ECHO   ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
ECHO   Ί ERROR! All files were not expanded in your temporary install          Ί
ECHO   Ί directory! You most likely are out of disk space on that drive.       Ί
ECHO   Ί- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Ί
ECHO   Ί Try making room on the drive and re-installing, or use another drive. Ί
ECHO   ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
ECHO:  
GOTO ALLDONE

:END
CLS

:ALLDONE
