@ECHO OFF

BREAK ON
PROMPT $P$G

REM
REM Set environment variables
REM
SET TEMP=C:\TEMP
SET PMTDISK=C:\PMT
SET MBXDISK=C:\MBX
SET DTADISK=C:\DTA
SET VBOARD=C:\BICOM
SET SOCKETS=C:\SOCKETS
SET TZ=GMT0
SET DIRSIZE=25,80
IF EXIST D:\NUL GOTO ADD_DISK
SET MSGDISK=C:\MSG
GOTO ENDENV
:ADD_DISK
IF EXIST D:\MSG\NUL GOTO DEF_MSG
MD D:\MSG
:DEF_MSG
SET MSGDISK=C:\MSG;D:\MSG
:ENDENV

REM
REM Set the path
REM
SET PATH=%DTADISK%;%VBOARD%;C:\DOS

REM
REM Issue VM_DOWN to the DCS
REM
%DTADISK%\VMDOWN

REM
REM Set Status LEDs to DOS mode
REM
%DTADISK%\LED /Q 0x300 80

IF %CONFIG%==DEBUG GOTO END

REM
REM Redirect output to COM1
REM
CTTY COM1

REM Run check disk  -- /C      Do not confirm before fixing errors
REM                    /F      Fix any errors encountered
REM                    /[      Hide program signon message
ECHO -- -------------------------- --
ECHO -- -- Check Storage Space  -- --
CHKDSK /C /F /[

REM
REM Install Smart Drive caching for drive C only
REM NOTE: The size cache will reduce the maximum number of EXT/MBX in SVM
REM
ECHO -- -------------------------- --
ECHO -- -- Enable Disk Caching  -- --
LOADHIGH C:\DOS\SMARTDRV A- B- C /U /Q /X

REM
REM If installed, start Sockets
REM
IF NOT EXIST %SOCKETS%\LANSTART.BAT GOTO END_LAN
SET PATH=%PATH%;%SOCKETS%
CALL %SOCKETS%\LANSTART.BAT
:END_LAN

REM
REM If not in SVM configuration, skip the remainder
REM
IF NOT %CONFIG%==SVM GOTO END

REM
REM Start the voice board system
REM
CALL %VBOARD%\VOXSTART.BAT

REM
REM Start SVM and exit the batch file
REM
%DTADISK%\SVMSTART.BAT

:END