By default, the AutoPlay dialog box displays each time you connect a removable device to the computer. If you wish, you can prevent this dialog box from displaying.

Click Start, type services.msc in the Search text box and click Services at the top of the Start menu. This action opens up the Services dialog box. Double-click on Shell Hardware Detection. In the Properties dialog box.


  

View the Startup type drop-down list and select Disabled. Confirm the new setting by clicking OK, then close the Services dialog box.

From now on, the AutoPlay dialog box will not display when you connect a removable device to the computer.

A video is available for this topic: http://www.mediaforma.com/en/oneminuteaday/windows-7/disable-autoplay-when-you-connect-a-removable-device.html