If you wish to disable the Autoplay feature for USB Drives & Audio CDs, here are some ways you can do it in Windows 7 and Vista:
1) Type gpedit.msc in the Start Search box, and then press ENTER to open the Group Policy Editor.
Under Computer Configuration > expand Administrative Templates > expand Windows Components > click Autoplay Policies.
In the RHS Details pane, double-click Turn off Autoplay to open the Properties box.
Click Enabled, and then select All drives in the Turn off Autoplay on box to disable Autorun on all drives.
Restart.
Additional Read:
How to selectively disable specific Autorun features and more on KB953252.
2) You can also open the Control Panel
Control Panel > Hardware and Sound > AutoPlay
and set the options as per your preferences.
3) The same can be achieved by editing the Registry.
Run regedit and navigate to
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
In the RHS, create a new dword and rename it to NoDriveTypeAutoRun.
Rt click on it and give it a decimal value 225 (or Hexadecimal value 000000FF)
Exit regedit. Reboot.
This will disable AutoRun on all drives
If you wish you may download this .reg fix and double click it and add the entries to your registry.
For more information and options visit Technet.
4) Or else … simply download and use our Ultimate Windows Tweaker.
5) See Microsoft releases update to restrict AutoRun in Windows Vista.
If you have any questions please visit our Windows Club Forums. For the latest on Windows, visit The Windows Club.