Why are there two values for NoDriveTypeAutoRun which disable Autoplay on drives of unknown type?
|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.|
Hey, wait, two of the entries are the same.
What’s the difference between 0x1 (Disables Autoplay
on drives of unknown type)
0x80 (Disables Autoplay on drives of unknown type)?
The values in the bitfield correspond to return values
#define DRIVE_UNKNOWN 0 #define DRIVE_NO_ROOT_DIR 1 #define DRIVE_REMOVABLE 2 #define DRIVE_FIXED 3 #define DRIVE_REMOTE 4 #define DRIVE_CDROM 5 #define DRIVE_RAMDISK 6
The value 0x1 corresponds to bit zero, which means that
GetDriveType function could not tell what
type of drive it is.
On the other hand, the value 0x80 does not correspond to
any known return value of
It’s reserved for future use.
My guess as to how this happened is that the original table
did not have an entry for 0x80.
Then somebody asked,
“What does 0x80 mean?”
The response was,
“It’s not used yet.
It’s for some future unknown drive type that has yet to be invented.”
“Okay, thanks. I’ll just say that the drive type is unknown.”
Bingo, now you have two copies of “drives of unknown type.”
The 0x1 means “drives whose type cannot be determined”
whereas the 0x80 means
“drives of a type not currently known to mankind.”
So let’s just pretend that the entry for
0x80 reads “Reserved for future use.”
(The page is archived content, so it’s not like anybody’s
going to be updating it.)
Pre-emptive snarky comment:
“Autoplay is the stupidest feature on the face of the planet.”
The issue here is not discussing whether Autoplay is a good idea or
I’m trying to improve the documentation.
I try to avoid providing tips/support about
controversial features because of the
flame-fest that invariably results.
This is an experiment to see if it’s safe to go back into the water.
Update: Comments have been disabled because everybody wants to
discuss whether Autoplay is a good idea or not, even though that topic
was explicitly taken off the table.