views:

217

answers:

3

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?

+3  A: 

I'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/

James Curran
I believe most computers (motherboards) have multiple (2 or 3) USB Controllers, so the limit is definitely higher than the number of devices people are going to connect. I can't imagine how much resources it would take for Windows to manage 240+ USB devices.
Chris Pietschmann
A: 

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.

Albert
A: 

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
Ken White