@echo off
:start
SET PC=0
echo Install Tex compiler (Y/N)?
%1:\resp YyNn
if errorlevel 3 goto m4
:m0
echo What type of computer you use ?
echo Press 1 for XT or 2 for AT-286 or 3 for AT-386(486)
%1:\resp 123
if errorlevel 3 goto m1
if errorlevel 2 goto m2
if errorlevel 1 goto m3
goto m3
:m1
echo What type TeX compiler you use ?
echo Press 1 for tex186.exe or 2 for tex386.exe
%1:\resp 12
if errorlevel 2 goto m1_2
if errorlevel 1 goto m1_1
:m1_2
SET PC=4
goto m4
:m1_1
SET PC=3
goto m4
:m2
SET PC=2
goto m4
:m3
SET PC=1
:m4
SET LA=N
echo Install LaTeX (Y/N)?
%1:\resp YyNn
if errorlevel 3 goto m5
SET LA=Y
:m5
SET NF=N
echo Install NFSS (Y/N)?
%1:\resp YyNn
if errorlevel 3 goto m6
SET NF=Y
:m6
SET AM=N
echo Install AMSTeX (Y/N)?
%1:\resp YyNn
if errorlevel 3 goto m7
SET AM=Y
:m7
SET
pause
if %AM%.==. goto err
if %PC% == 0 goto m9
echo ***
echo *** CyrTUG package ***
copy %2:toms.exe %1:\emtex
%1:\unz -d -o %2:lhtexinp %1:\ @%1:\lhtinp_.ls
%1:\unz -d -o %2:rustest %1:\
if NOT %PC% == 4 goto m8
echo ***
echo *** CyrTUG (tex386,btex) ***
%1:\unz -d -o %2:cyrtug %1:\ @%1:\cyrtug3.ls
%1:\unz -d -o %2:batch386 %1:\
goto m9
:m8
echo ***
echo *** CyrTUG fmt-files (tex,tex286,tex186) ***
%1:\unz -d -o %2:cyrtug %1:\ @%1:\cyrtug_.ls
%1:\unz -d -o %2:cyrfmt %1:\
if %PC% == 1 goto m9
%1:\unz -d -o %2:batch186 %1:\
:m9
if %LA% == N goto m10
echo ***
echo *** LaTeX Russian styles & documents ***
rem %1:\unz -d -o %2:russty %1:\
%1:\unz -d -o %2:lkypc %1:\
:m10
if %NF% == N goto m11
echo ***
echo *** LaTeX2e package ***
%1:\unz -d -o %2:lhtexinp %1:\lhtinp2e.ls
:m11
if %AM% == N goto m20
echo ***
echo *** AmSTeX package ***
%1:\unz -d -o %2:amstex %1:\
%1:\unz -d -o %2:amstfm %1:\
goto m20
:err
echo *************************************************************
echo You mast to quit the Norton Comander or yours Commands Shell
echo and repeat INSTALL %1 %2
echo *************************************************************
pause
goto m21
:m20
call %1:\ckd 00 %2
:m21
echo *** Deleting temporary files ***
%2:delinst %1