It works for my USB external hard disk:
C: 0,0 IDE Fixed
D: 1,0 IDE Fixed
E: 7,0 USB Fixed
G: 7,1 USB Fixed
H: 7,2 USB Fixed
I: IDE CD-ROM
J: 2,0 SCSI Removable
K: 3,0 USB Removable
L: 4,0 USB Removable
M: 5,0 USB Removable
N: 6,0 USB Removable
O: 7,3 USB Fixed
(letters E: G: H: O: )
Try using the /v switch and post output.....
About ordering, at the end of the batch "main", after:
FOR /F "Tokens=2 delims==" %%? IN ('SET LDrive') DO ECHO %%?
and before:
GOTO :EOF
These two lines:
Quote
ECHO.
FOR /F "Tokens=2 delims==" %%? IN ('SET LDrive ^|SORT /+14') DO ECHO %%?
Output becomes this

:
C: 0,0 IDE Fixed
D: 1,0 IDE Fixed
E: 7,0 USB Fixed
G: 7,1 USB Fixed
H: 7,2 USB Fixed
I: IDE CD-ROM
J: 2,0 SCSI Removable
K: 3,0 USB Removable
L: 4,0 USB Removable
M: 5,0 USB Removable
N: 6,0 USB Removable
O: 7,3 USB Fixed
I: IDE CD-ROM
C: 0,0 IDE Fixed
D: 1,0 IDE Fixed
J: 2,0 SCSI Removable
K: 3,0 USB Removable
L: 4,0 USB Removable
M: 5,0 USB Removable
N: 6,0 USB Removable
E: 7,0 USB Fixed
G: 7,1 USB Fixed
H: 7,2 USB Fixed
O: 7,3 USB Fixed
We could give a "fake" physical drive number to CD-ROM(s) to alter the order.
PE is a different thing....
Also I need to know how would a SATA CD/DVD behave....
And however I am not so sure that entries in Services\Disk\Enum are the same as the output of WMIC.....
this needs to be checked thoroughfully.
EDIT:
Checked, and unfortunately they do not correspond

a similar batch using WMI gives different results:
C: 0_0 IDE Fixed [HD] MAXTOR STM3320820AS
D: 1_0 IDE Fixed [HD] MAXTOR STM3320820AS
E: 3_0 USB Fixed [HD] SAMSUNG HD320KJ USB Device
G: 3_1 USB Fixed [HD] SAMSUNG HD320KJ USB Device
H: 3_2 USB Fixed [HD] SAMSUNG HD320KJ USB Device
J: 2_0 SCSI Removable [HD] Perisoft Virtual Disk SCSI Disk Device
K: 4_0 USB Removable Generic USB SD Reader USB Device
L: 5_0 USB Removable Generic USB CF Reader USB Device
M: 6_0 USB Removable Generic USB SM Reader USB Device
N: 7_0 USB Removable Generic USB MS Reader USB Device
O: 3_3 USB Fixed [HD] SAMSUNG HD320KJ USB Device
Additionally mountvol does not detect IMDISK Virtual Disks

:
http://www.boot-land...?showtopic=3909
I guess we need to find out how to manage correctly the entries in \DosDevices and forget about mountvol.
The FREEDRV I wrote some time ago could be part of the solution...I will have to study it (I am getting old an cannot even say if it used mountvol or not....):
http://www.911cd.net/forums//index.php?sho...=21965&st=6
EDIT:
Checked, no way to detect IMDISK volumes through Mountvol or Registry....
jaclaz
P.S.: On the machine I tried it I don't have a floppy, thus it is not "detected" at all (there is NO code for it), but I think anyway that it would be advisable to simply "exclude" A: and B: from the mountvol command, you aren't going to change those drive letters, are you?
This post has been edited by jaclaz: 07 December 2008 - 09:32 AM