Date published: 2004-01-23 Date updated: 2011-01-17
Product:
Endpoint Protection
Module(s):
Command line scanner
Operations System(s):
Windows XP 32 bits
Windows Vista 32 bits
Windows 2000
Linux
Windows XP 64 bits
Windows Vista 64 bits
Windows 95/98/Me
Windows NT
Novell Netware
Windows 2003 Server
Using error level or return codes from the command line scanner.
When finished running, nvcc (and the DOS counterpart NVCCX) returns a given error level (or return code) which can be utilized in for example batch jobs or interpreted by other programs:
Return code 2 and 1 will override all other return codes. This means that even if NVCC has detected an invalid archive file which should make it to return 11, it will return 1 if it encounters infections further out in the scan. Testing return codes in a batch job may for example be done like this:
@\norman\nvc\bin\nvcc /C /LF:\nvc.log /l:1 /s /u %1 %2
@echo %errorlevel% >> error.log
@echo .
@goto error%errorlevel%
:error1
:error2
@echo Virus found!
@goto end
:error3
:error4
@echo Check argument list!
@goto end
:error7
@echo Internal non-fatal error.
@goto end
:error8
@echo Internal fatal error. NVCC stopped.
@goto end
:error9
@echo Scanning aborted by user.
@goto end
:error10
@echo Some files not scanned - no error.
@goto end
:error11
@echo Could not open some archive files.
@goto end
:error0
@echo No error
:end