AutoPlay function in Windows was originally built for ease of use. When you insert external media such as USB drives or external hard disk, Windows will run a specific application based on the AutoPlay set.
Unfortunately this function has been misused by virus makers to infect your computer. The virus is programmed to launch automatically when autoplay function is activated. That is why, even better if you turn off AutoPlay function this straight.
Ways want to turn off the AutoPlay in Windows 7
1. Open Control Panel and type "AutoPlay" in the search box. You'll see the AutoPlay category is displayed. Click on the 'Change default settings for media or devices'
2. Clear the check box 'Use AutoPlay for all media and devices'. Press the Save button.
As simple as that, you have disabled the AutoPlay function to reduce the risk of your computer is infected with a virus. And do not forget to install antivirus on your computer as the primary protection against the virus.