Echo OFF
Cls
Echo *======[[ Computer Tyme Software Installation ]]========*
Echo .
Echo If you are installing MarxMenu ......
Echo .
Echo This program will unpack the compressed files and compile
Echo the menus. Then MarxMenu will create the MARX.BAT file for
Echo your system.
Echo .
Echo *===============[[ I M P O R T A N T ! ]]===============*
Echo .
Echo You should be running this on your hard disk or network
Echo If you're not, copy the files onto your hard disk or network
Echo and run INSTALL from there.
Echo .
Echo Be sure to copy ALL the disks that came with your software
Echo your hard disk or network before running INSTALL.
Echo .
Echo *===============[[ I M P O R T A N T ! ]]===============*
Echo .
Echo If you are running this on a floppy disk, press CTRL-C now!
Echo .
Pause
Cls

rem *--- Here we test to see if anyone on the network has MarxMenu
rem *--- in use. If it's in use then we can't delete the overlay.

if exist NSK.EXE goto nettest
if exist NSKEVAL.EXE goto nettest
goto start

:nettest
if not exist MARXMENU.OVR goto start
del MARXMENU.OVR
if exist MARXMENU.OVR goto locked

:start
if not exist NSK.EXE goto skip
Echo Unpacking Network Survival Kit . . .
NSK -o
if ErrorLevel 1 goto Err
DEL NSK.EXE

:skip
if not exist NSKEVAL.EXE goto skip1
Echo Unpacking Network Survival Kit Evaluation . . .
NSKEVAL -o
if ErrorLevel 1 goto Err
DEL NSKEVAL.EXE

:skip1
if not exist SMARX.EXE goto skip3
Echo UnPacking MarxMenu Files . . .
SMarx -o
if ErrorLevel 1 goto Err
DEL SMARX.EXE

:skip3
if not exist DISK2.EXE goto skip4
Echo Unpacking MarxEdit and TSR Utilities . . .
Disk2 -o
if ErrorLevel 1 goto Err
DEL DISK2.EXE

:skip4
if not exist TOOLBOX.EXE goto skip5
Echo Unpacking Dos ToolBox . . .
ToolBox -o
if ErrorLevel 1 goto Err
DEL TOOLBOX.EXE

:skip5
if not exist DOCS.EXE goto skip6
Echo Unpacking Documentation . . .
Docs -o
if ErrorLevel 1 goto Err
DEL DOCS.EXE

:skip6
if not exist INST.MNU goto skip7
Echo Compiling Menus . . .
for %%m in (*.mnu) do MarxComp %%m
if exist MXPRN.EXE MxPrn
Cls
Echo Loading Installation Menu . . .
MARXMENU INST

:skip7
if exist PIPEDIR.EXE copy PIPEDIR.EXE WHEREIS.EXE >nul
if exist RAMMAP.EXE copy RAMMAP.EXE INMEM.EXE >nul
cls
echo All Done!
goto end

:Locked
cls
echo MARXMENU.OVR was found and could not be deleted! This is commonly
echo caused by trying to install MarxMenu on a network while users are
echo still using MarxMenu. You will need to chase everyone out of the
echo menu to complete the upgrade!
goto end

:Err
echo.
echo An error occurred while installing the software!
echo.
echo The most common error is trying to run INSTALL from a floppy
echo disk drive. The correct procedure is to copy all the enclosed
echo disks onto your hard disk or network and then run install.
echo.
echo If you still have a problem call Computer Tyme tech support
echo at 1-417-866-1222.
echo.

:end
