After canceling the auto running of PENDRIVE, open cmd from Start -> Run. In the command prompt type the drive letter: (for example, e:) and press enter. Next, type dir /w/a and press enter. This will display a list of the files currently exist in the pendrive. Check whether if there’s any suspicious file or file that exist unexpectedly.
If any suspicious file is found, then probably the USB drive is already infected. In command prompt type attrib -r -a -s -h *.* and press enter. This will remove the attributes of Read Only, Archive, System and hidden file from all the files, so that you’re able to delete the files. To delete the files, use the command del filename. example del autorun.inf. Delete all the files that are suspicious.
Disable autorun for all USB devices
For best practice, it’s good to disable autorun feature for all USB removable drives which can potentially carry a virus. To disable autorun feature in Windows 7 or Vista,
Go to the Start menu, click on Control Panel.
Double click on the Default Programs icon. If in case you don’t see that icon, find the big word Programs, click it and now you should be able to see the Default Programs icon.
Click on Change Auto play settings.
Scroll through the list and locate Mixed Content.
From the drop down menu, you can choose what action or program you want your computer to run when you plug in your USB device. In this case, we’ll choose take no action.
In Windows XP, you’ll need to install a tool called Tweak UI. Run the tool, navigate to Desktop ->My Computer -> Autoplay, from there you can disable autoplay for all removable medias.