Posted on 31/08/2009 by


This registry hacks basically determines how your operating system responds when you insert a CD, DVD, or flash drive. so how this works is that there is a Media Change Notification (MCN) in your flash drive that starts the auto play of the drive. but if these messages are supressed or ignored then your computer wont do jack-shit and you will have to manually go to My Computer and double click on your drive.

To modilfy this behaviour you will have to change the value of the key NoDriveTypeAutoRun ( or NoDriveAutoRun). The difference between these two keys is that if you change the value of the former then you can decide how each drive type will respond so for example only the CDs will commence AutoPlay in your system and no other drive.

Now this might get a little messy so bear with me. Each drive has a hexadecimal value so if you want to stop two particular drive types from AutoPlay then just take the sum of the value of these two drives. the values are :

  • 0x1 for disabling AutoPlay on drives of unknown types
  • 0x4 for disabling AutoPlay on removable drives
  • 0x10 for disabling AutoPlay on network drives
  • 0x8 for disabling AutoPlay on fixed drives
  • 0x40 for disabling AutoPlay on on RAM drives
  • 0x20 for disabling AutoPlay on CD-ROM drives
  • 0x80 for disabling AutoPlay on drives of unknown types
  • 0xFF for disabling AutoPlay on all types of drives

I’ll show you how it works by giving an example, In Vista the default value is 0x91. this can be caluclated by adding 0x1 (unknown types), 0x80 (unknown types) and 0x10 (network drives) which means that every drive except these will autorun.

now follow these steps to edit the registry to influence autorun:

NOTE: if you havent already, then read the precautions here

  • Lauch regedit. dont know how? read my previous post here
  • Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer from your left panel
  • see if you have a key called NoDriveTypeAutoRun. If you dont then right click on an empty spot on the right panel and choose New-> DWORD (32 bit) value and name it NoDriveTypeAutoRun.
  • Then just use a hexadecimal calculator to calucuate the sum suitable for your settings and change the value of NoDriveTypeAutoRun to that particular value.
  • No need to restart, your settings will take place automatically.