A lot of programs has built-in mechanism to use antivirus solution to scan files for viruses and malware, especially applications that deal with files and receive or download files over Internet. As such, user who uses AVG security solution such as AVG Internet Security, AVG Anti-Virus or AVG Anti-Virus Free Edition (this article focuses on AVG 8 and AVG 8.5), it’s possible to use the AVG virus scanner as the virus scanner for WinRAR or WinZIP to scan the archives for virus when opening, extracting, expanding or testing the ZIP or RAR and other supported format archives. The AVG anti-virus scanner can also be used to scan downloaded files at Windows Live (MSN) Messenger, Miranda IM, Download Express and other third-party programs.

Note: Depending on the versions or editions of the AVG solution you’re using, the path to the AVG executable may be different. There is also difference in executable name based on system architecture, i.e. x86 (32-bit) or x64 (64-bit).

For 32-bit x86 System Architecture

Use the AVGSCANX.EXE program with /scan=%file% /exe=* /arc /clean parameters. For example:

AVGSCANX.EXE /scan=%file% /exe=* /arc /clean
“C:\Program Files\AVG\AVG8\AVGSCANX.EXE” /scan=%file% /exe=* /arc /clean

For 64-bit x64 System Architecture

Use the AVGSCANA.EXE program with /scan=%file% /exe=* /arc /clean parameters. For example:

AVGSCANA.EXE /scan=%file% /exe=* /arc /clean
“C:\Program Files (x86)\AVG\AVG8\AVGSCANA.EXE” /scan=%file% /exe=* /arc /clean

The parameters may be different for different programs though, and can be customized to add more options, such as /HEUR for heuristic scan and /PUP for reporting potentially unwanted programs. Type “avgscanx.exe /?” or “avgscana.exe /?” to see a list of switches accepted.

The AVGSCANX.EXE program in the AVG program folder on hard drive – typically C:\Program Files\AVG\AVG8, or C:\Program Files\Grisoft\AVG7\, or C:\Program Files\Grisoft\AVG Free\, or C:\Program Files\AVG\AVG Free8\ (for AVG Anti-Virus 8.5 Free Edition).

Below is a few examples of the AVG scanner configuration in some popular applications.

Using AVG Virus Scanner with WinZIP

In WinZIP, go to Options -> Configuration -> Program Locations and configure Scan program as follows:

C:\Program Files\AVG\AVG8\avgscan?.exe (replace ‘?’ with ‘x’ or ‘a’)

Then configure Parameters as below:

/scan=%d ext=* /arc /clean

Set AVG Virus Scanner to Scan Archives in WinRAR

In WinRAR, navigate to Tools -> Scan archive for viruses and configure Virus scanner name as:

C:\Program Files\AVG\AVG8\avgscan?.exe (replace ‘?’ with ‘x’ or ‘a’)

and Virus scanner parameters as:

/scan=%f ext=* /arc /clean

Use AVG Scanner in Miranda IM

In Miranda IM, go to Options -> Events -> File Transfer, and configure Command line as:

“C:\Program Files\AVG\AVG8\avgscan?.exe” /scan=%f /ext=* /arc /clean (replace ‘?’ with ‘x’ or ‘a’)

Set AVG Scanner as Default Virus Scanner in Download Express

In Download Express, go to Options -> General, and set the parameters as

C:\Program Files\AVG\AVG8\avgscan?.exe /scan=%1 ext=* /arc /clean (replace ‘?’ with ‘x’ or ‘a’)

Using AVG Anti Virus Scanner with Windows Live MSN Messenger

In AVG 8 or AVG 8.5, the above parameters do not actually scan the files anymore in Windows Live Messenger or MSN Messenger. The scan of transferred or downloaded files appear to taken place, but 0 files was scanned when result is displayed or checked in log file. If you’re using older AVG 7.5, just go to Tools -> Options -> File Transfer, check the Scan files for viruses using option, and enter the following parameter:

“C:\Program Files\Grisoft\AVG Free\avgw.exe” /SE

For AVG 8 or AVG 8.5 users, create a file with named such as ScanAVG8.bat with the following text:

@echo off
"C:\Program Files\AVG\AVG8\avgscan?.exe" /SCAN=%1 /HEUR /ARC /PUP /CLEAN
(replace ‘?’ with ‘x’ or ‘a’)

Save the ScanAVG8.bat file in a convenient location on local hard disk. In MSN Messenger or Windows Live Messenger, go to Tools -> Options -> File Transfer, check the Scan files for viruses using option, and enter the following parameter:

“C:\Path\To\ScanAVG8.bat” (Replace Path\To with actual path to ScanAVG8.bat where it’s saved)

If you would like to see the scan result to make sure the virus scanning on transferred files are working, just change the code in ScanAVG8.bat to the following:

@echo on
"C:\Program Files\AVG\AVG8\avgscan?.exe" /SCAN=%1 /HEUR /ARC /PUP /CLEAN (replace '?' with 'x' or 'a')