I am doing a hard disk scan in my program, and I remember the bad old days when scanning B drive would freeze my machine. Can I skip A and B drives for those users that still have floppies? Are A or B drives in Windows ever used for things other than a floppy disk?
-
Just a quick idea: You could exclude all removable drives. – Filburt Feb 18 '12 at 08:02
-
The item I am searching for is on a removable drive (a USB stick usually) but never on a floppy. – unixman83 Feb 18 '12 at 08:03
-
2This has changed. In the past (e.g. DOS/Windows 98) it was definitely true. However I believe that they can *both* be mapped in Vista+ (if they are not assigned by the FDD driver which would only be if it was entirely disabled, e.g., by BIOS). Run the "Disk Management" snap-in. (I can map B under the Parallels VM, it has a FDD driver for A only.) Due to legacy reasons, only a really silly setup system would utilize A/B for anything else, just as only silly systems change C (although it is entirely possible to have Windows on a different -- non C -- partition). – Feb 18 '12 at 08:14
2 Answers
It shouldn't matter to you which drive letters are assigned to what kind of drives.
Use GetLogicalDrives
to determine what drive letters are assigned and GetDriveType
and SetupDiGetDeviceRegistryProperty
to determine the type of a drive.

- 348,265
- 75
- 913
- 977
Windows always assigns letter A to the first floppy drive, and B to a second floppy drive. If there is no second floppy, B will act as a virtual floppy and will point to A. If there are no floppies, A and B will be considered invalid drive letters.
I believe there is a possibility that if all the drive letters between C and Z are assigned, some old versions of DOS and Windows would reuse A and B, but that's a highly unlikely situation.
Your program can safely skip A and B in its search, assuming you don't care about floppy drives.
Edit: More info
Mapped network drives can also inhabit A: and B:

- 31,971
- 6
- 56
- 67