Most of the viruses these infect through portable drives and other removable USB drives, these viruses , worms and trojans are so called as autorun viruses. These autorun viruses infect due to enabled autorun due to which when you connect the virus infected drive to your computer, it executes the code which installs or copies the virus in your computer and its gets infected.
In order to stop these kind of viruses infection, you need to stop the autorun feature in windows, here is a free program which lets you do it.
AutoRun Vaccine is a small program to enable or disable AutoRun feature of Windows, it will stop the viruses to take the advantage of autorun feature to infect USB devices to spread or re-infect your computer.
It is very simple and easy to use program as shown in the above snapshot, which lets you take enable or disable autorun in single click.