echo off
rem 2nd pass?
if (%0) == (hinst)   goto HINST
if (%0) == (HINST)   goto HINST

rem 1st pass!
if (%1) == () goto usage
if (%2) == () goto usage
if (%3) == () goto usage

md %2%3
%2
cd %2%3
copy %1\inst.bat %2%3\hinst.bat
hinst %1
rem This is pass 2 (goes to :HINST)

:HINST
echo Place Disk 1 into drive %1, and
pause
copy %1\PKUNZIP.EXE
pkunzip -od %1\FIRMCO-1.ZIP %2%3
if errorlevel 1 goto ziperr

:zipdone
cd PROGRAM
UPDATE
REM -- JUMPED TO A BATCH FILE, WE SHOULD NEVER COME HERE...

goto done

:usage
echo To use this program, type:
echo    INST s: d: \directory
echo Where  s:           is the floppy drive you're installing from (usually A:),
echo        d:           is the hard drive you're installing to (usually C:), and   
echo        \directory   is the directory where the files will be installed
echo                     (e.g. \FRETAIL)
goto done

:ziperr
echo A diskette error occurred during installation...
echo .
echo You should contact Fidelity Technical Support for assistance.

:done
