more compatible batch file for ording drive letters updated on 1 Nov. 2008
#12
Posted 20 October 2008 - 01:33 PM
Get the the Perisoft minifile and miniram drivers and try it:
http://www.perisoft....iport/index.htm
jaclaz
#13
Posted 20 October 2008 - 04:43 PM
This post has been edited by victor888: 20 October 2008 - 09:34 PM
#14
Posted 22 October 2008 - 08:07 AM
It is a GOOD idea and the code is OK
I mean, I feel like it is overly complex, and it is possible that it won't work on some localized versions. (changing the "Removable" to "mov" should cover a number of European ones)
I did a couple of check and some temp files can be made unneeded.
Still, I could not find a way to manage diskpart without a temp file.
While researching about it, I found something I had never seen (or better never paid attention to) that may be a better approach:
WMIC (Windows Management Instrumentation Command):
http://www.ss64.com/nt/wmic.html
http://www.robvander...e.com/wmic.html
http://www.robvander...com/wmigen.html
http://www.robvander...arrays_bat.html
Maybe this could be a "slimmer" approach.
Check the attached example.
jaclaz
Attached File(s)
-
testwmic.zip (809bytes)
Number of downloads: 29
This post has been edited by jaclaz: 22 October 2008 - 08:10 AM
#15
Posted 22 October 2008 - 08:18 AM
I think of using wmic but do not study it.
Your sample is really very good.
WMIC command is too powerful.
This post has been edited by victor888: 22 October 2008 - 09:38 AM
#16
Posted 27 October 2008 - 07:45 AM
FOR WIN2K3 AND VISTA diskpart, mountvol etc are of no use.
This post has been edited by victor888: 27 October 2008 - 08:32 PM
#17
Posted 28 October 2008 - 12:58 AM
victor888, on Oct 27 2008, 02:45 PM, said:
Nice VBS script.
I'll try to replicate it's approach.
jaclaz
#18
Posted 28 October 2008 - 01:45 AM
I am studying wmi/wmic these days too, hope an smart script come out ealier under your work and my support.
#19
Posted 29 October 2008 - 05:44 AM
Nothing actually working, but a little step further.
Check testwmic3.cmd:
Finding the escaping characters needed to use the "Where" operator with the value "Disk #m, Partition #n" and redirecting failing instances to nul can only be described as a nightmare!
Rule seems to be that you need to enclose the Where argument into brackets () to be able to use the quotes "" inside it, and when in a FOR loop:
equal sign = needs to be escaped
quotes " and commas , (that normally would need to be escaped) need NOT to be escaped
jaclaz
Attached File(s)
-
testwmic2_3.zip (1.05K)
Number of downloads: 27
#21
Posted 01 November 2008 - 04:33 AM
I seem not to be able through WMIC to "find a relationship" between PHYSICALDRIVEs and LogicalDrives when the device is "Removable".
Moreover it seems like the available data go as deep as finding Extended Partitions but not deep enough to find Logical Volumes inside them.
Find attached another example, it seems to me that it gathers all available data through WMIC.
jaclaz
Attached File(s)
-
getdriveletters.zip (1.18K)
Number of downloads: 28
#22
Posted 01 November 2008 - 05:15 AM
I will try to continue.
#23
Posted 02 November 2008 - 06:28 AM
symbol2mvol.cmd
Uses:
Listdosdevices:
http://www.uwe-siebe...ivetools_e.html
VLM (part of the DSFOK package):
http://members.ozema...eezip/freeware/
Output sample:
C:\Downloaded\victor888>symbol2mvol
C: FIX \\.\Volume{b0b284c3-8a33-11dd-8781-806d6172696f} \HarddiskVolume1
D: CDR \\.\Volume{80cf88c2-8a34-11dd-813c-806d6172696f} \CdRom0
E: FIX \\.\Volume{b0b284c4-8a33-11dd-8781-806d6172696f} \HarddiskVolume2
G: REM \\.\Volume{80cf88c4-8a34-11dd-813c-806d6172696f} \Harddisk4\DP(1)0-0+b
H: REM \\.\Volume{80cf88c5-8a34-11dd-813c-806d6172696f} \Harddisk5\DP(1)0-0+c
I: REM \\.\Volume{80cf88c6-8a34-11dd-813c-806d6172696f} \Harddisk6\DP(1)0-0+d
J: FIX \\.\Volume{98f06d4c-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume3
K: FIX \\.\Volume{98f06d4d-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume4
L: FIX \\.\Volume{98f06d4e-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume5
M: FIX \\.\Volume{98f06d4f-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume6
N: REM \\.\Volume{80cf88c3-8a34-11dd-813c-806d6172696f} \Harddisk3\DP(1)0-0+a
S: REM \\.\Volume{5d3e8800-9c1f-11dd-8148-001fc6bb76ce} \Harddisk2\DP(1)0-0+5
Runnning listdosdevices with a /? parameters outputs a mess of data, maybe it can be useful.
A similar app is dosdev:
http://www.ltr-data.se/opencode.html
and on the same page there is devioctl.
Devioctl with the GEOMETRY <drive> parameters gives the needed info, <drive> can be:
- drive letter
- PhysicalDriven
(but it won't work -obviously-
jaclaz
Attached File(s)
-
symbol2mvol.cmd (863bytes)
Number of downloads: 22
This post has been edited by jaclaz: 02 November 2008 - 06:29 AM
#24
Posted 04 November 2008 - 09:16 AM
DiskExt v1.1 which gives each disk it mount volume and drive letters.
#25
Posted 04 November 2008 - 10:30 AM
victor888, on Nov 4 2008, 04:16 PM, said:
Yep
A more useful app is the dd for windows version by John Newbigin:
http://www.chrysocome.net/dd
try running
dd --list
jaclaz
This post has been edited by jaclaz: 04 November 2008 - 10:33 AM
#26
Posted 04 November 2008 - 10:54 AM
#27
Posted 04 November 2008 - 09:33 PM
#28
Posted 08 November 2008 - 06:07 AM
I found the secret in registry.
I am compositing the batch now.
#29
Posted 08 November 2008 - 06:54 PM
#30
Posted 18 November 2008 - 06:14 PM
http://www.msfn.org/board/Switching-drive-...rs-t125992.html
Wim
This post has been edited by wim: 21 November 2008 - 04:00 PM
#31
Posted 27 December 2008 - 05:31 AM
http://www.boot-land...?showtopic=8219
is a small batch to take advantage of the features of the dd --list mentioned before.
Example output:
C:\VSS>ddlist
Drives by drive letter:
c: 0,1 Fixed HarddiskVolume1 {b0b284c3-8a33-11dd-8781-806d6172696f}
d: 1,1 Fixed HarddiskVolume2 {b0b284c4-8a33-11dd-8781-806d6172696f}
e: 3,1 Fixed HarddiskVolume3 {98f06d4c-9506-11dd-8147-001fc6bb76ce}
f: 8,1 Fixed HarddiskVolume11 {0cb309be-d343-11dd-ab05-001fc6bb76ce}
g: 3,2 Fixed HarddiskVolume4 {98f06d4d-9506-11dd-8147-001fc6bb76ce}
h: 3,3 Fixed HarddiskVolume5 {98f06d4e-9506-11dd-8147-001fc6bb76ce}
i: x,x CD-ROM CdRom0 {80cf88c2-8a34-11dd-813c-806d6172696f}
j: 2,1 Removable Harddisk2\DP(1)0-0+5 {5d3e8800-9c1f-11dd-8148-001fc6bb76ce}
k: 4,1 Removable Harddisk4\DP(1)0-0+f {80cf88c3-8a34-11dd-813c-806d6172696f}
l: 5,1 Removable Harddisk5\DP(1)0-0+10 {80cf88c4-8a34-11dd-813c-806d6172696f}
m: 6,1 Removable Harddisk6\DP(1)0-0+11 {80cf88c5-8a34-11dd-813c-806d6172696f}
n: 7,1 Removable Harddisk7\DP(1)0-0+12 {80cf88c6-8a34-11dd-813c-806d6172696f}
o: 3,4 Fixed HarddiskVolume6 {98f06d4f-9506-11dd-8147-001fc6bb76ce}
Premere un tasto per continuare . . .
Drives by connection:
c: 0,1 Fixed HarddiskVolume1 {b0b284c3-8a33-11dd-8781-806d6172696f}
d: 1,1 Fixed HarddiskVolume2 {b0b284c4-8a33-11dd-8781-806d6172696f}
j: 2,1 Removable Harddisk2\DP(1)0-0+5 {5d3e8800-9c1f-11dd-8148-001fc6bb76ce}
e: 3,1 Fixed HarddiskVolume3 {98f06d4c-9506-11dd-8147-001fc6bb76ce}
g: 3,2 Fixed HarddiskVolume4 {98f06d4d-9506-11dd-8147-001fc6bb76ce}
h: 3,3 Fixed HarddiskVolume5 {98f06d4e-9506-11dd-8147-001fc6bb76ce}
o: 3,4 Fixed HarddiskVolume6 {98f06d4f-9506-11dd-8147-001fc6bb76ce}
k: 4,1 Removable Harddisk4\DP(1)0-0+f {80cf88c3-8a34-11dd-813c-806d6172696f}
l: 5,1 Removable Harddisk5\DP(1)0-0+10 {80cf88c4-8a34-11dd-813c-806d6172696f}
m: 6,1 Removable Harddisk6\DP(1)0-0+11 {80cf88c5-8a34-11dd-813c-806d6172696f}
n: 7,1 Removable Harddisk7\DP(1)0-0+12 {80cf88c6-8a34-11dd-813c-806d6172696f}
f: 8,1 Fixed HarddiskVolume11 {0cb309be-d343-11dd-ab05-001fc6bb76ce}
i: x,x CD-ROM CdRom0 {80cf88c2-8a34-11dd-813c-806d6172696f}
Premere un tasto per continuare . . .
jaclaz
This post has been edited by jaclaz: 16 July 2009 - 10:47 AM



Help
Back to top









