Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

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

alt text

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

alt text

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.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Look at How to selectively disable specific Autorun features on the Microsoft KB967715 page.

To selectively disable specific Autorun features, you must change the NoDriveTypeAutoRun entry in one of the following registry key subkeys:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\policies\Explorer\

The following table shows the settings for the NoDriveTypeAutoRun registry entry.
Collapse this tableExpand this table

Value   Meaning
0x1 or 
0x80    Disables AutoRun on drives of unknown type
0x4 Disables AutoRun on removable drives
0x8 Disables AutoRun on fixed drives
0x10    Disables AutoRun on network drives
0x20    Disables AutoRun on CD-ROM drives
0x40    Disables AutoRun on RAM disks
0xFF    Disables AutoRun on all kinds of drives

The value of the NoDriveTypeAutoRun registry entry determines which drive or drives the Autorun functionality will be disabled for.

share|improve this answer
    
It says "in one of the following" (OR). Based on a controlled experiment I conducted today I found it was not sufficient to turn off AutoRun using the HKEY_LOCAL_MACHINE key. It had to be done using the HKEY_CURRENT_USER key. I don't know if the HKEY_LOCAL_MACHINE key is required or not. Platform: Windows XP Professional x64 Edition SP2. –  Peter Mortensen Feb 8 '10 at 9:53
add comment

I found this on a random blog. It should solve your problem fine:

  1. Navigate to HKEY_CURRENT_USER -> Software -> Microsoft -> Windows -> CurrentVersion -> Policies -> Explorer
  2. Double click on NoDriveTypeAutoRun
  3. Change the current valut to B5 in Hex. This disables CDROMs and USB drives
share|improve this answer
    
For reference: B5 (hex) is 10110101 in binary (base 2). –  Peter Mortensen Feb 8 '10 at 9:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.