Disable AutoRun for specific external drive

5

0

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?

JamesGecko

Posted 2010-09-13T22:32:41.273

Reputation: 1 582

Use this to disable autorun for a specific drive : https://technet.microsoft.com/en-us/library/Cc938275.aspx

– iman – 2015-08-07T01:38:45.400

@iman That's Windows 2000 documentation; NoDriveAutoRun doesn't work in versions of Windows released in the last decade. – JamesGecko – 2015-08-08T03:57:14.140

2Granularity was removed from Vista and Windows 7, I have never found a way to do it, so I turn off auto play. – Moab – 2010-09-13T23:27:13.967

I don't think it's possible. – soandos – 2011-08-05T02:17:39.847

@Moab How do you do this? – coelhudo – 2012-07-04T22:49:18.960

@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 – 2012-07-05T20:21:10.613

Nice, I had a similar problem and that was part of the problem, thanks!. – coelhudo – 2012-07-05T20:44:15.493

@JamesGecko that article is for XP and Vista – Moab – 2012-07-21T00:44:05.827

@coelhudo go to Control Panel>Autoplay, turn it off at the top tick box – Moab – 2012-07-21T00:45:01.537

Answers

7

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.

surfasb

Posted 2010-09-13T22:32:41.273

Reputation: 21 453

The answer by bertieb works better, disabling specific drive letters. – GreenReaper – 2016-07-30T14:58:27.910

1Unfortunately, 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 – 2012-01-04T00:32:45.277

1

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.

JamesGecko

Posted 2010-09-13T22:32:41.273

Reputation: 1 582

1Keep 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 – 2014-02-23T21:06:10.467

1

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!

Newlog

Posted 2010-09-13T22:32:41.273

Reputation: 11

1

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 : https://technet.microsoft.com/en-us/library/Cc938275.aspx

HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

Data type Range Default value

REG_DWORD 0x0–0x3FFFFFF (bitmap) 0x0

Description

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

iman

Posted 2010-09-13T22:32:41.273

Reputation: 11

0

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

amckern

Posted 2010-09-13T22:32:41.273

Reputation: 1

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 – 2014-06-13T17:36:53.360