@echo off
set a=%1
set c=%2
if %3x==contx goto cont
if %3x==deletex goto delete
if "%2"=="" set c=C:
if "%1"=="" set a=A:

echo During installation, 10 Mb of free space is needed.
echo After installation you can delete "EXDEMOS1.HFV" if
echo you don't want to keep the demos on-line, and then
echo Executor will only be using 3 Mb of disk space.
echo .
echo Type Ctrl-C if you don't have 10 Mb free space on %c% 
pause

if exist \executor          goto alreadythere
if exist \executor\executor goto alreadythere
if exist \executor\execuvol goto alreadythere

%c%
mkdir \executor
mkdir \executor\tmp
cd \executor\tmp
copy %a%*.* .
copy install.bat ..
del install.bat
..\install.bat %a% %c% cont
:cont
echo Now insert the other Executor installation disk.
:loop
pause

set f=2
set d=2
if exist \executor\tmp\readme set f=1
if exist %a%\readme set d=1
if not %f%==%d% goto match
echo That is not the right disk.  Please try again.
goto loop

:match
copy %a%*.* .
.\unz50p1
copy/b executor.pt1+executor.pt2 ..\executor.zip
copy unzip.exe ..
del unzip.exe
cd ..
echo y | del tmp\*.* > tmp2
del tmp2
rmdir tmp
cd ..
\executor\unzip \executor\executor.zip
del executor\unzip.exe
del executor\executor.zip

%a%install %a% %c% delete
:delete
echo Executor is now installed in \Executor\Executor.
echo You may want to add \Executor to your PATH in autoexec.bat.

del executor\install.bat
goto end

:alreadythere
echo Executor appears at least partially installed.  This batch file
echo wants to create the directory "Executor" in "\", but there is
echo already something there.  If Executor isn't already fully installed,
echo please correct this and try again.

:end

