Disable AutoRun for specific external drive
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
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!
Solution 3
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.
Solution 4
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
Related videos on Youtube
Comments
-
JamesGecko almost 2 years
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?
-
Admin almost 14 yearsGranularity was removed from Vista and Windows 7, I have never found a way to do it, so I turn off auto play.
-
Admin almost 13 yearsI don't think it's possible.
-
Admin almost 12 years@Moab How do you do this?
-
Admin almost 12 years@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.
-
Admin almost 12 yearsNice, I had a similar problem and that was part of the problem, thanks!.
-
Admin almost 12 years@JamesGecko that article is for XP and Vista
-
Admin almost 12 years@coelhudo go to Control Panel>Autoplay, turn it off at the top tick box
-
Admin almost 9 yearsUse this to disable autorun for a specific drive : technet.microsoft.com/en-us/library/Cc938275.aspx
-
Admin almost 9 years@iman That's Windows 2000 documentation;
NoDriveAutoRun
doesn't work in versions of Windows released in the last decade.
-
-
JamesGecko over 12 yearsUnfortunately, 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!
-
Jemenake over 10 yearsKeep 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.
-
GreenReaper almost 8 yearsThe answer by bertieb works better, disabling specific drive letters.