@echo off
rem *----------------------------------------------*
rem * IBM AntiVirus/DOS                            *
rem * Version 2.5 beta 2                           *
rem * 5555-937 (C) Copyright IBM Corp. 1989, 1996. *
rem * All rights reserved.                         *
rem * U.S. Government Users Restricted Rights -    *
rem * Use, duplication or disclosure restricted    *
rem * by GSA ADP Schedule Contract with IBM Corp.  *
rem *----------------------------------------------*
rem * Arguments:                                   *
rem *    %1 - execution directory                  *
rem *----------------------------------------------*
if exist %1IAVEXIT.BAT call %1IAVEXIT.BAT %1 %1
%1IBMAVDQ MSGFILE
if errorlevel 100 goto out
if errorlevel 2 goto twof
if errorlevel 1 goto onef
goto RUN4
:twof
loadhigh %1IBMAVLM %1local.msg
goto RUN
:onef
%1IBMAVLM %1local.msg
:RUN
%1IBMAVDQ RUN
if errorlevel 1 goto shield
%1IBMAVDQ TOOLD
if errorlevel 1 goto run6
goto shield
:run6
cls
@echo *** Warning ****************************************************
@echo *                                                              *
@echo * This version of IBM AntiVirus needs to be updated to enhance *
@echo * your protection against newer viruses. Please install the    *
@echo * latest version of IBM AntiVirus.                             *
@echo *                                                              *
@echo ****************************************************************
:SHIELD
%1IBMAVDQ SHIELD
if errorlevel 100 goto out
if errorlevel 8 goto eight
if errorlevel 7 goto seven
if errorlevel 6 goto six
if errorlevel 5 goto five
if errorlevel 3 goto three
if errorlevel 2 goto two
if errorlevel 1 goto one
goto disk
:eight
loadhigh %1IBMAVSH /S /X
goto ckrun
:seven
%1IBMAVSH /S /X
goto ckrun
:six
loadhigh %1IBMAVSH /S
goto ckrun
:five
%1IBMAVSH /S
goto ckrun
:four
loadhigh %1IBMAVSH /S /X /H
goto ckrun
:three
%1IBMAVSH /S /X /H
goto ckrun
:two
loadhigh %1IBMAVSH /S /H
goto ckrun
:one
%1IBMAVSH /S /H
:CKRUN
if errorlevel 30 goto loaderr
if errorlevel 5 goto tstrun
goto disk
:LOADERR
@echo Unable to load IBMAVSH
goto out
:TSTRUN
%1IBMAVDQ RUN
if errorlevel 1 goto disk
if exist %1IBMAVD.EXE %1IBMAVD /AUTORUN

:DISK
%1IBMAVDQ CHECKDISK
if errorlevel 100 goto out
if errorlevel 2 goto twod
if errorlevel 1 goto oned
goto OPENCK
:twod
loadhigh %1IBMAVDT I
goto OPENCK
:oned
%1IBMAVDT I

:OPENCK
%1IBMAVDQ CHECKOPEN
if errorlevel 100 goto out
if errorlevel 2 goto twoo
if errorlevel 1 goto oneo
goto WARN
:twoo
loadhigh %1IBMAVFC I
goto WARN
:oneo
%1IBMAVFC I

:WARN
%1IBMAVDQ WARNVIR
if errorlevel 100 goto out
if errorlevel 2 goto twoe
if errorlevel 1 goto onee
goto RUN4
:twoe
loadhigh %1IBMAVBH I
goto RUN4
:onee
%1IBMAVBH I
:run4
%1IBMAVDQ RUN
if errorlevel 1 goto run5
goto out
:RUN5
if exist %1IBMAVD.EXE %1IBMAVD /AUTORUN
:out
