08-13-2010, 01:39 PM
Quote:public static void usbcheck()
{
DriveInfo[] drives = DriveInfo.GetDrives();
{
foreach (DriveInfo drive in drives)
if (drive.DriveType == DriveType.Removable)
if (drive.RootDirectory.Root.ToString()[0] == Environment.CurrentDirectory[0])
// Is USB Drive
else
{
// Not USB Drive
}
}
}
Grabbed from my TBOT Source.
it doesnt have to have a malware application.
very usefull code.