Home > Commands A-M > Commands M

MSAV


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Scans your computer for known viruses.


Syntax

MSAV [drive:] [/S | /C] [/R] [/A | /L] [/N] [/P] [/F] [/VIDEO] [/IM] [/LE] [/NGM] [/PS2]


Parameters
drive: ((MSDOS6.00))
Specifies the drive that MSAV scans for viruses. If you do not specify a drive, MSAV scans the current drive.

Switches
/A ((MSDOS6.00))
Scans all drives except drive A: and drive B:.
/C ((MSDOS6.00))
Scans the specified drive, and removes viruses that MSAV finds.
/F ((MSDOS6.00))
Turns off the display of filenames that have been scanned. Use this switch only with the /N or /P switch.
/IM ((MSDOS6.00))
Do NOT support mouse.
/L ((MSDOS6.00))
Scans all local drives except network drives.
/LE ((MSDOS6.00))
Exchanges left and right mouse buttons.
/N ((MSDOS6.00))
Displays the contents of an MSAV.TXT file, if it exists and it is located in the directory that contains the MSAV.EXE file. MSAV then scans the current drive or the drive you specify. MSAV does not use the graphical interface. If MSAV detects a virus, it returns exit code 86 instead of displaying a message on your screen.
/NGM ((MSDOS6.00))
Runs MSAV using the default mouse character instead of the graphics character.
/P ((MSDOS6.00))
Displays a command-line interface instead of the graphical interface.
/PS2 ((MSDOS6.00))
Resets the mouse if the mouse cursor disappears or locks up.
/R ((MSDOS6.00))
Creates an MSAV.RPT file that lists the number of files MSAV checked for viruses, the number of viruses it found, and the number of viruses it removed. By default, MSAV does not create a report. When it does create MSAV.RPT, the file is placed in the root directory.
/S ((MSDOS6.00))
Scans the specified drive, but does not remove viruses that MSAV finds.
/VIDEO ((MSDOS6.00))
Displays a list of the switches that affect how MSAV is displayed. This list contains all of the switches:

Related

none.


Notes
CHKLIST.MS files

Microsoft Anti-Virus creates a CHKLIST.MS file in each directory you scan for viruses. The first time you scan a directory, Microsoft Anti-Virus records in the CHKLIST.MS file checksums for each program. During subsequent scans, it compares new checksums with the originals to determine if program files have changed. A difference in checksum values indicates a possible virus infection.


Real symptoms versus false alarms

Damaged programs, some memory-resident programs, and conflicts among device drivers can cause your computer to act as if it were infected by a virus when it is not. If you suspect your computer is infected, consider the possible causes for the symptoms you observe. Instead of a computer virus, a hardware or software problem is likely to be producing errors.


Check All Files option

When the Check All Files option is selected, AnitVirus for DOS checks only files with the extensions: .386, .APP, .BIN, .CMD, .DOM, .DLL, .DRV, .EXE, .FON, .ICO, .OV*, .PGM, .PIF, .PRG, .SYS.


MSAV.INI and the MSDOSDATA environment variable

When you start Anti-Virus for DOS, it uses an initialization file named MSAV.INI to configure the program. To determine the location of the MSAV.INI file, Anti-Virus for DOS first searches for the %MSDOSDATA% environment variable, which specifies the path to the initialization file. If this environment variable is not defined, the program searches for the MSAV.INI file in the directory from which you started Anti-Virus for DOS. If the program does not find the file, the program creates it using default values and places it in the directory.

The %MSDOSDATA% environment variable is useful if you share the MSAV.EXE file with others, but use your own configuration for Anti-Virus for DOS. For example, suppose the MSAV.EXE file is located in the root directory on drive P, a read-execute-only network server, and you want Anti-Virus for DOS to use your own configuration when it starts. To specify that it use the MSAV.INI file located in the DOS directory on your drive C instead of the initialization file located on network drive P, add to your AUTOEXEC.BAT file:

    SET msdosdata=C:\DOS

To start Anti-Virus for DOS, type:

    p:\MSAV

Changes you make to the configuration of Anti-Virus for DOS are saved in the MSAV.INI file located in the DOS directory on drive C.


Using the /N switch

If you specify the /N switch, MSAV displays the contents of an MSAV.TXT file, if it exists and it is located in the directory that contains the MSAV.EXE file. MSAV then scans the current drive or the drive you specify. MSAV does not use the graphical interface. If MSAV detects a virus, it returns exit code 86 instead of displaying a message on your screen.


Examples

To start MSAV using a black and white color scheme, and to specify that MSAV check all drives except drives A: and B:, type:

    MSAV /BW /A

Exit code

To write a simple batch program named VIRUS.BAT that supports the MSAV exit code and the /S switch to scan the current drive, you can type the commands by using DOS Editor:

    @ECHO OFF
     REM Smith's msav command
     MSAV /S /N
     IF ERRORLEVEL 86 GOTO virus
     IF NOT ERRORLEVEL 86 GOTO none
    :virus
     ECHO MSAV has detected a virus on your current drive!
     GOTO exit
    :none
     ECHO MSAV found no viruses on your current drive.
     GOTO exit
    :exit

Errorlevels
Availability
External
DOS
v6.0
Windows
none
Windows NT
none