How to Enable / Disable Autorun for a Drive (using Registry)
All computers with a modern version of Windows installed support the AutoRun technology. This technology is used to automatically start a program or open a document on a CD, DVD or USB flash drive (etc). But in some computers this feature can be turned off for some specific drive types. Administrators can disable this functionality in client computers for CD/DVD drives and USB flash drives for security reasons. And some programs, for example CD/DVD burning programs, can sometimes also turn off this functionality.
The 'NoDriveTypeAutoRun' subkey value in Windows Registry
If AutoRun is disabled for a drive that you want to have AutoRun on you can often enable it by changing a value in Windows registry. There is a value with the name NoDriveTypeAutoRun at the following two registry subkeys that can be changed to enable or disable AutoRun for different drives:
The default value for NoDriveTypeAutoRun is 91 (hexadecimal) in Windows XP, Windows Vista and Windows 7. In older versions of Windows (Windows 2000 and earlier) the default value is 95 (hexadecimal). In Windows Vista and Windows 7 the NoDriveTypeAutoRun subkey value name often do not exists in the registry until it is changed from its default value. If the value name is not there you can add it yourself with Windows Registry Editor.
If NoDriveTypeAutoRun has another value than the default and AutoRun is not working with your CD/DVD or USB flash drive then you probably have found the reason. If the value is B1 or B5 (hexadecimal) then AutoRun for CD/DVD is turned off. If the value is B5 then AutoRun for USB flash drives has also been turned off. If you want to enable AutoRun for your CD/DVD drive you can change the value to 91, or to 95 if you want to keep AutoRun for USB flash drives turned off. After you have done your changes, you must restart your computer before AutoRun works again for the drive.
More details about 'NoDriveTypeAutoRun'
The NoDriveTypeAutoRun subkey value contains a bit mask where every bit that is set disables a drive type. The default value for NoDriveTypeAutoRun in Windows XP and newer is 91 (hexadecimal), giving a bit pattern of 10010001. Bit number 5 enables/disables AutoRun for CD/DVD drives and as default this bit is cleared (set to 0). By setting NoDriveTypeAutoRun to the value of B1 (hexadecimal), the bit number 5 will be set (have the value 1) and the CD/DVD drive is disabled. The bit pattern for B1 is 10110001.
By setting or clearing another bit in NoDriveTypeAutoRun another drive type can have the Autorun functionality disabled or enabled. In the table below you can see which bit that corresponds to which drive type:
If you for example want to turn off AutoRun support for USB flash drives (USB sticks) you must set bit number 2 in the NoDriveTypeAutoRun subkey value. If you clear this bit AutoRun will work again for USB flash drives. Expressed in hexadecimal: you must give NoDriveTypeAutoRun the value of 95 to disable AutoRun support and give NoDriveTypeAutoRun the value of 91 to enable AutoRun support for USB flash drives. Bit number 2 will also turn on/off AutoRun support for floppy disks.
Summary - some possible values for 'NoDriveTypeAutoRun'
The table below summarizes the values for NoDriveTypeAutoRun that is mentioned in this article. These values can be used to enable or disable AutoRun for CD/DVD drives and USB flash drives. The values in the table are in hexadecimal:
In Windows Vista / Windows 7 AutoRun can be disabled via the Control Panel
In Windows Vista and Windows 7 it is possible to disable AutoRun for drives by using the Control Panel. If you open the Control Panel and chooses Hardware and sound and then AutoPlay, a dialog box that can be used to change settings for AutoPlay and AutoRun is opened. The combo box at Software and games can be used to change settings for AutoRun (see the picture below):
By choosing the Take no action option the AutoRun functionality will be disabled in Windows. When you insert a disc in the drive nothing will happen. By choosing Install or run program AutoRun will work again. But you should be aware of that the NoDriveTypeAutoRun subkey value in registry has higher priority than the setting in the Control Panel, so if AutoRun for a drive is disabled via NoDriveTypeAutoRun then you can not enable it by using the Control Panel. You can only enable it by changing the NoDriveTypeAutoRun subkey value in registry.
SamLogic CD-Menu Creator
More articles are available from the article index page.
|Article written by: Mika Larramo||Swedish|