C#.NET

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

using System.IO;

 

 

namespace WindowsApplication1

{

   publicpartialclassForm1 : Form

   {

     public Form1()

       {

             InitializeComponent();

        }

 

        private void cmd_check_Click( object sender, EventArgs e)

         {

               DriveInfo [] allDrives = DriveInfo .GetDrives();              foreach ( DriveInfo d in allDrives)

           {

             string path;

               if (d.DriveType == DriveType .Removable)

             {

                   path=d.Name+
"autorun.ini" ;               if ( File .Exists(path))

                  {

                   MessageBox .Show(d.Name + " YOU HAVE VIRUS !" );

                  }

               else

                   MessageBox .Show(d.Name + " NO VIRUS " );

 

          }

}

 

}

}

}