Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an external USB hard drive with two partitions on it. Every time my computer boots up Windows 7, I get two autorun popup windows. This is annoying; I'd like Windows to just mount the partitions silently.

I could disable autorun for a specific drive type, but the drive classifications are not very fine grained, and I'd still like to get autorun for USB keys.

Is there a way I can disable autorun specifically for the two partitions on my USB hard drive, and nothing else?

share|improve this question
Granularity was removed from Vista and Windows 7, I have never found a way to do it, so I turn off auto play. – Moab Sep 13 '10 at 23:27
I don't think it's possible. – soandos Aug 5 '11 at 2:17
@Moab How do you do this? – coelhudo Jul 4 '12 at 22:49
@coelhudo Go to Microsoft's Autorun support page and either follow the instructions, or click on one of the "Fix it for me" buttons halfway down the page. – JamesGecko Jul 5 '12 at 20:21
Nice, I had a similar problem and that was part of the problem, thanks!. – coelhudo Jul 5 '12 at 20:44

5 Answers 5

up vote 7 down vote accepted

It's possible but it takes some work. I know where to start, but I don't know how to implement it for ya.

These are the registry keys you would have to modify. Unfortunately, you'll need to hunt down all the classIDs of all the components what are listed as handlers for CD/DVDs. A scorched earth method would be just to unlist them as event handlers. I wouldn't recommend that though, as that could break programs. . .


Nevermind the above. I figured it out.

Look for the registry setting for this group policy. Then use the chart in the article to get the setting you want. For example, I wanted to block the following drives: Unknown, Network, and CD. Using my handy dandy Windows Calculator, I get the value of b1(Hexadecimal) or 177. Punch that bad boy it.

share|improve this answer
Unfortunately, the classes of device which that registry key disables are overly broad. For example, it do not distinguish between my 2GB USB thumbdrive and my 1TB USB external hard drive with several partitions. This was close, though! – JamesGecko Jan 4 '12 at 0:32

So, there's apparently no hope for me, the hapless Windows 7 user. But if you're using Windows 2000, XP or 2003 (and only if you're using Windows 2000, XP or 2003), you're in luck!

This MSDN document contains instructions on how to disable auto-play on individual drive letters.

Basically, you start by taking the drive letters you want to disable. For me it was E, F, and G.


This is a binary number. Change the digits under the drive letters you want to disable auto play on to 1. Like this:


Ignore all the leading zeroes. Now I have


Convert it to hex with the Windows calculator or whatever.


Now open the start menu, type regedit and go here:


Go to the menu and select Edit > New > DWORD (32-bit) value.

Name it NoDriveAutoRun. Now, type in the number you just figured out. Close regedit. Magic! Rebooting may be required for the change to take effect.

share|improve this answer
Keep in mind that this will disable AutoPlay for certain drive letters. So, if your USB drive comes up a drive D:, and you block AutoPlay for D:, and then you plug in a different USB drive which is assigned D:, the AutoPlay of that will be blocked. Then, if you leave that in and plug in your original drive, it will get a different drive letter, and AutoPlay will not be blocked on it. So, the blocking doesn't follow the device. And, of course, it doesn't follow it to other machines, either. – Jemenake Feb 23 '14 at 21:06

As of Windows Vista, disabling autoplay for USB drives ONLY doesn't seem to be possible using Regitry (regedit.exe), Group Policy Editor (gpedit.msc) or Control Panel (control.exe).

What DOES work is to disable autoplay from the drive itself!

Proceed as follows:

  • Enable viewing hidden files in Windows Explorer's options (if not already enabled)

  • Browse to the root of the drive

  • locate FILE autorun.inf and renanme it eg. to autorun.IDLE.inf

  • create a FOLDER named autorun.inf and set its attribute the HSA (Hidden + System + Archive)

  • Reset viewing hidden files in Windows Explorer's options, if required

That's it!

share|improve this answer

Go to Control Panel\All Control Panel Items\AutoPlay in windows 7, down the bottom, chose take no action on the drop down in the external devices section

share|improve this answer
This disables autorun for every external device. If you read the question or the comments on the accepted answer, you'll note that I wanted to disable autorun for a specific, individual device. – JamesGecko Jun 13 '14 at 17:36

I had the same problem and used this to fix the issue on Windows 7 Professional edition.

Use this to disable autorun for a specific drive :


Data type Range Default value

REG_DWORD 0x0–0x3FFFFFF (bitmap) 0x0


Determines whether Autoplay is enabled on each drive connected to the system. When Autoplay is enabled, media starts automatically when it is inserted in the drive.

The value of this entry consists of 32 bits. The lower 26 bits each represent a drive, with the lowest (right-most) bit representing drive A, and the 26th bit from the right representing drive Z. If a bit is set to 0, the Autoplay feature is enabled on that drive. If a bit is set to 1, the Autoplay feature is disabled on that drive.

For example, if the value of this entry is 0x8 (1000 binary), Autoplay is disabled on drive D.

This uses the "NoDriveAutoRun" registry key (which is still working in Windows 7) to change the behaviour of a specific drive

share|improve this answer

Your Answer


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.