If you connect your pen drive or flash disk to any virus infected system then your pen drive to get infected.Then what is it that makes the virus activate when you plug-in your pen drive?
It is the file autorun.inf that makes the virus execute every time you connect your pen drive. And when you try to delete the file manually the virus regenerate the autorun.inf (.inf = information) file.
The question is how to restrict the file to be created?
Well, create a folder on the desktop and name it autorun.inf. Go to the properties of the folder, in General tab enable the check boxes: Hidden, Read Only. Now delete the autorun.inf file form your pen drive and quickly copy and paste the folder we’ve created. Now the file autorun.inf will be restricted until you delete the file.
The above step makes the virus deactivated, but the virus isn’t removed yet.
Sometimes, if your antivirus program even though it is updated, is not able to remove the virus. Or it detects and tries to remove the virus. But, the virus regenerates itself. Now a simple process is to create a folder as described above and name it same as the virus is e.g. Notepad.exe, VirusCleaner.vbe etc.