I know the drive limit can be gotten around using junction points, but is there a limit to the number of physical devices recognized/mounted in the registry and shown using the MOUNTVOL command or Win32 API?
views:
217answers:
3I'm not sure if Windows imposes a limit, but the USB protocol standard has a limit of 128 devices per host controller. The allowed device address range is 0 to 127.
You can download the USB Specifications here: http://www.usb.org/developers/docs/
I believe each USB drive could be split into multiple logical partitions too.
If in the end you don't get an answer, choose a number and gracefully fail if there are more than you expected.
There's a limit under Win32 because MOUNTVOL mounts drives, which must be assigned a drive letter (DOS legacy issue). That means, since A & B are reserved for floppy drives, and C is (by default) the first hard drive, you have a max of 23 other drives that can be mounted and assigned drive letters. It doesn't matter what type of drive - USB, HDD, or CD/DVD.
According to the Win32 docs, MountVol has the following syntax:
mountvol [Drive:]Path VolumeName
mountvol [Drive:]Path /d
mountvol [Drive:]Path /L
mountvol Drive: /s