fortypoundhead.com

NoDriveTypeAutoRun and AutoPlay

Posted On 2008-08-18 by dwirch
Keywords:
Tags: Software Hack/Tweak Vista Windows XP
Views: 14234


This registry hack will control what happens to AutoPlay when you put a CD into the drive caddy. Researching NoDriveTypeAutoRun, reminds me of a tip that I was given for playing chess; when you find a good move, look for an even better one. Previously I had known about plain AutoRun, but now I have found a more flexible registry setting, NoDriveTypeAutoRun.

Media Change Notification (MCN) messages from the CD-ROM driver, trigger the AutoPlay behaviour of the CD. However, if these messages are suppressed then the CD will not automatically start playing. You can disable AutoPlay by configuring the appropriate value of NoDriveTypeAutoRun (or NoDriveAutoRun) in the registry.

The benefit of using NoDriveTypeAutoRun, rather than NoDriveAutoRun, is that you can fine-tune which drives you wish to disable. For example, you can disable all network and all unknown drives from running AutoPlay, but allow CD-ROM drives to run AutoPlay, and thus start automatically.

below, is a table of the hex values to control AutoPlay on a variety of drives. The entries are a bitmapped value. To disable AutoPlay on a particular type of drive, set the bit representing that type of drive to 1. If you want to disable more than one type of drive, sum the hexadecimal values of the representative bits.

In XP, the default value for NoDriveTypeAutoRun is 0x95 (149). You calculate the figure by summing: 0x1 (unknown types), 0x80 (unknown types), 0x4 (floppy drives), and 0x10 (network drives). In Vista the default is 0x91 (145). Similar to XP, but without the floppy drive setting.

0x1 Disables AutoPlay on drives of unknown type.
0x4 Disables AutoPlay on removable drives.
0x8 Disables AutoPlay on fixed drives.
0x10 Disables AutoPlay on network drives.
0x20 Disables AutoPlay on CD-ROM drives.
0x40 Disables AutoPlay on RAM drives.
0x80 Disables AutoPlay on drives of unknown type.
0xFF Disables AutoPlay on all types of drives.

One interesting feature of NoDriveTypeAutoRun is that you can set the value in either HKLM** or HKCU. If you go overboard and configure both, then the Local_Machine over-rides the Current_User.
  1. Type "regedit" in the Start Search dialog box. (See more details on starting regedit)
  2. Navigate to this path: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  3. If necessary create a dword called NoDriveTypeAutoRun
  4. Set the dword thus:NoDriveTypeAutoRun = 000000FF
  5. A value of 000000FF (decimal 255) disables AutoRun on all drives.
  6. Refer to the above table, and use a Hexadecimal calculator to compute the most suitable value for your machine.
  7. There is no need to logoff; the NoDriveTypeAutoRun setting should take effect straightaway.


About the Author

dwirch has posted a total of 187 articles.


Comments On This Post

No comments on this post yet!


Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.


Your IP address is:54.163.209.109

Before you can post, you need to prove you are human. If you log in, this test goes away.




Recent Forum Posts

Advanced search added
dwirch posted on September 23, 2017 at about 13:44 in Site News

Job Spammer: Gaurav Mehta - AgreeYa Solutions
dwirch posted on September 22, 2017 at about 10:35 in Spammers

Job Spammer: Prutha Siri - Javelin Systems
dwirch posted on September 10, 2017 at about 6:15 in Spammers

New security implemented
dwirch posted on September 7, 2017 at about 7:16 in Site News

Malicious IP Checker Companion Tool
dwirch posted on August 12, 2017 at about 20:24 in Site News

Job Spammer: Steve Adams
dwirch posted on August 8, 2017 at about 7:44 in Spammers