12
VirusScan
®
Command Line 5.20.0 Product Guide
Installing VirusScan
®
Command Line
Installing the software
2
Sample batch file
The following code is provided only as a suggestion, for you to use and modify to suit
your own purposes. It has not been thoroughly tested. This sample batch file assumes
that
SCAN
and the DAT files are in the current directory. It enables the login to the
Netware server only if the scan finds no viruses on the workstation. All local drives are
scanned, and the user cannot press
CTRL
BREAK
to quit the scan.
@ECHO OFF
SCAN /ADL /SECURE /NOBREAK
IF ERRORLEVEL 102 GOTO ERR102
IF ERRORLEVEL 21 GOTO ERR21
IF ERRORLEVEL 20 GOTO ERR20
IF ERRORLEVEL 19 GOTO ERR19
IF ERRORLEVEL 15 GOTO ERR15
IF ERRORLEVEL 13 GOTO ERR13
IF ERRORLEVEL 10 GOTO ERR10
IF ERRORLEVEL 8 GOTO ERR8
IF ERRORLEVEL 6 GOTO ERR6
IF ERRORLEVEL 2 GOTO ERR2
IF ERRORLEVEL 0 GOTO ERR0
:ERR102
ECHO User exited.
GOTO EXIT
:ERR21
ECHO Clean on reboot. Please restart this PC to complete cleaning.
GOTO EXIT
:ERR20
ECHO Frequency error (Don't scan N hours after the previous scan).
GOTO EXIT
:ERR19
ECHO All cleaned.
GOTO EXIT
:ERR15
ECHO Self-integrity check failed
GOTO EXIT
:ERR13
ECHO Virus found!
GOTO EXIT
:ERR10
ECHO A virus was found in memory!
GOTO EXIT
:ERR8
ECHO DAT file not found.
GOTO EXIT
:ERR6
ECHO There has been a problem [not a virus] with scan.
GOTO EXIT
:ERR2
ECHO DAT file integrity check failed.
GOTO EXIT
:ERR0
ECHO Scan completed successfully. No viruses found.
LOGIN1.EXE %1 %2 %3
:EXIT