How to use the command-line scanner

This feature is only available in avast! Pro antivirus and avast! Internet Security.

The ashCmd program uses the same avast! scanning engine to detect potential malware infections so the results are exactly the same as running a scan via the normal program interface. The avast! command-line scanner, ashCmd.exe, is normally installed in the directory C:\Program Files\AVAST Software\avast.

A scan is run from the command prompt using various switches and parameters. To see a description of the parameters, locate the ashCmd file and double click on it. This will open a new window in which the various parameters are displayed. A list of all the parameters can also be found here in the avast! Help.

To run a scan, go to the command prompt and change the directory to:

C:\Program Files\AVAST Software\avast

Then type the program name ashCmd.exe followed by the area to be scanned and the appropriate parameters. For example, to scan all local hard drives, the command line would be:

ashCmd.exe /*

Additional parameters can be added as required. To scan a particular file, type the required path, making sure that any names containing spaces are enclosed in quotation marks (” “) e.g.

ashCmd.exe “C:\Program Files”

To run a particular scan, type the program name followed by /@=<name of scan>. For example, to run a scan called “Weekly scan”, the command line would be:

ashCmd.exe /@=”Weekly scan”

The scan will be run based on the parameters defined for the given scan. Any other parameters entered in the command line will be ignored.

When the scan is finished, the results can be output to a file using the parameter “/_ >” so, for example, the command line:

ashCmd.exe C:\Windows /_ > results.txt

would result in the path C:\Windows being scanned and the results of the scan being saved in a new file called results.txt

Using the command line