Log on with an account with Administrator privileges. Click Start, Run, type gpedit.msc and press Enter.
The Group Policy console will open.
On the left, Expand Computer Configuration, Administrative Templates, System.
Highlight System. On the right, look for an item which says "Turn Off Autoplay". The current setting is likely "Not configured".
Double click the item and set it to "Enabled" (meaning enable turning off). Click OK. Changes may or may not require a restart to take effect.
If you only want to disable autoplay for the current logged on account, select User Configuration, Administrative Templates, System, "Turn off autoplay".