Disable autorun Win7

http://www.thewindowsclub.com/enable-disable-autoplay-windows

Registry Editor

The same can also be achieved by editing the Registry. Run regedit and navigate to

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

In the RHS, you will see dword NoDriveTypeAutoRun. You will see default value 60 or 3C. Right-click on it and give it a decimal value 255 (or Hexadecimal value 000000FF). Exit regedit. Reboot. This will disable AutoRun on all drives.