Setting up ClamAV on Windows

These days having some form of anti-virus is a must, common sense works most of the time but it's good to have a backup just in case, ClamAV is a very minimal anti-virus that performs exceptionally well, it's also free and open source.

Get the latest stable version here, as of this time 'clamav-0.99.2-x64.msi', once installed you will need to configure it.


Open the location you installed it to, by default for me 'C:\Program Files\ClamAV-x64', once you are in there create a new text file and name it 'freshclam.conf', due to the windows security system you may need to make and edit this on your desktop before moving it in.

A lot of options are available that you can view in the sample configuration files, but for now just add in the basics.

DatabaseDirectory C:\Program Files\ClamAV-x64\database
UpdateLogFile C:\freshclam.log
LogFileMaxSize 25M

This is all pretty well self explanatory, you will need to create the database folder or change the path to the database if you installed it somewhere else.

Open a command prompt as administrator, this can be done by finding it in your start menu, right clicking it and clicking 'Run as administrator', change to your ClamAV folder with 'cd C:\Program Files\ClamAV-x64' for example and type freshclam.exe, if all is well it will update the database.

Automatic Updates

To ensure you get regular updates you can setup a scheduled task, to do this run taskschd.msc (Windows Task Scheduler) and perform the following:

Running a scan

Scanning is done by running clamscan.exe, again this is a command line program, to scan a single file simply type 'clamscan.exe path-to-file.exe', the exact same can be used for a directory as well, if you wish to scan all subdirectories add the -r flag like so 'clamscan.exe -r folder-to-scan'

There are a lot of options available, you can list them all by typing 'clamscan.exe --help', some of the most useful are given below:


ClamAV certainly can't be described as user friendly but it's definitely powerful and versatile, while the command line interface can be a bit daunting at first it's something you will learn to love, this article has only touched on the basics of what ClamAV can do so don't forget to check out the official documentation.


Comments, ideas and criticism welcome.
Note: Comments are subject to manual approval.

No comments at the moment, why not make one ?