1. Open registry editor by selecting Start, then Run, then entering "regedit /v" as the command.
2. Select the topmost mode ("My Computer") in the registry hierarchy.
3. Search (ctrl-F) for the following value: NoDriveTypeAutoRun
4. Each time you find the NoDriveTypeAutoRun value, change it to 0xdd. That should turn off autoplay for everything *but* your CD drives. To turn it off for everything, use 0xff.
5. Repeat the above for all remaining occurrences of NoDriveTypeAutoRun throughout your registry. Be sure to note each original value and the path to it , in case you want to restore it later.
6. Close the registry and re-boot your PC. These registry values will not take effect until AFTER you have rebooted.