I find it very annoying when I go home from work and plug my laptop into my external hard drive… The autoplay window always pops up and asks me what I want to do with the files, which may be fine the first time, but definitely isn’t after a year of that.

To get to the configuration screen for this setting, go to Start Menu \ Run and type in:

> 
> gpedit.msc
> 
> 
> 

You will see the Group Policy window. You should select Administrative Templates \ System in the tree view:

![enter image description here](https://i.stack.imgur.com/3w50c.png)

You will see an item in the right side pane called “Turn off Autoplay”

![alt text](https://i.stack.imgur.com/NWqUe.png)

Double click the item, and set the radio button to Enabled, and change the “Turn off Autoplay on” to All Drives.

![alt text](https://i.stack.imgur.com/CFkOu.png)

Now you should be safe from the autoplay monster... 
***THIS IS GREAT (and it works) BUT I WANT TO DO THIS WITH THE REGISTRY ?....***

Just to clarify the question further; it is very straight forward to do this for CD-ROMS

Click the Run button and type REGEDIT.EXE.

Navigate to the following key:  

> 
> `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom`
> 
> 
> 

If you look at this registry key for the autorun feature, you can see the Autorun value there.  

Edit the Autorun value and type 0 for it.  
 But I would like to do this for USB Keys.