Sometimes you need to scan messages comming to your mail to check if it contains some viruses or malicious programs. Also in situations like while downloading content you need to scan the content before you download. Here is the sample code to invoke Avast antivirus(not checked for others) to scan the content of a folder.
|
using System.Diagnostics;
Page_Load() { // Create a Process process myproc = new process(); string myprocarg = "E:\\wallpaper\\"; //Process Argument myproc.StartInfoArguments = myprocarg; myproc.StartInfo.FileName = "C:\\ProgramFiles\\Avast\\Avast4\\ashQuick.exe"; myproc.Start(); myproc.WaitForExit(); } |