Disable AutoRun for specific external drive

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?


Solution 1:

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

http://msdn.microsoft.com/en-us/library/cc144210(v=VS.85).aspx

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. . .

edit:

Nevermind the above. I figured it out.

http://support.microsoft.com/kb/967715

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.

Solution 2:

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.

ZYXWVUTSRQPONMLKJIHGFEDCBA
00000000000000000000000000

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

ZYXWVUTSRQPONMLKJIHGFEDCBA
00000000000000000001110000

Ignore all the leading zeroes. Now I have

1110000

Convert it to hex with the Windows calculator or whatever.

70

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

HKEY_CURRENT_USER
   Software
      Microsoft
         Windows
            CurrentVersion
               Policies
                  Explorer

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.