victor888 Posted October 27, 2008 Author Share Posted October 27, 2008 (edited) WMI is too powerful, most valuable link: http://www.windows-management.com/scriptin...cal/#ADPPDD.htmFOR WIN2K3 AND VISTA diskpart, mountvol etc are of no use. Edited October 28, 2008 by victor888 Link to comment Share on other sites More sharing options...
jaclaz Posted October 28, 2008 Share Posted October 28, 2008 WMI is too powerful, most valuable link: http://www.windows-management.com/scriptin...cal/#ADPPDD.htmNice VBS script. I'll try to replicate it's approach. jaclaz Link to comment Share on other sites More sharing options...
victor888 Posted October 28, 2008 Author Share Posted October 28, 2008 Jaclaz go!I am studying wmi/wmic these days too, hope an smart script come out ealier under your work and my support. Link to comment Share on other sites More sharing options...
jaclaz Posted October 29, 2008 Share Posted October 29, 2008 Find attached another example.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 escapedquotes " and commas , (that normally would need to be escaped) need NOT to be escapedjaclaztestwmic2_3.zip Link to comment Share on other sites More sharing options...
victor888 Posted October 29, 2008 Author Share Posted October 29, 2008 Very good example. I will study it asap. Link to comment Share on other sites More sharing options...
jaclaz Posted November 1, 2008 Share Posted November 1, 2008 It seems to me that after all WMIC is not "the" solution, but it may be part of it.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. jaclazgetdriveletters.zip Link to comment Share on other sites More sharing options...
victor888 Posted November 1, 2008 Author Share Posted November 1, 2008 you make more progress in using wmic.I will try to continue. Link to comment Share on other sites More sharing options...
jaclaz Posted November 2, 2008 Share Posted November 2, 2008 (edited) Almost, but not quite, completely unrelated symbol2mvol.cmdUses:Listdosdevices:http://www.uwe-sieber.de/drivetools_e.htmlVLM (part of the DSFOK package):http://members.ozemail.com.au/~nulifetv/freezip/freeware/Output sample:C:\Downloaded\victor888>symbol2mvolC: FIX \\.\Volume{b0b284c3-8a33-11dd-8781-806d6172696f} \HarddiskVolume1D: CDR \\.\Volume{80cf88c2-8a34-11dd-813c-806d6172696f} \CdRom0E: FIX \\.\Volume{b0b284c4-8a33-11dd-8781-806d6172696f} \HarddiskVolume2G: REM \\.\Volume{80cf88c4-8a34-11dd-813c-806d6172696f} \Harddisk4\DP(1)0-0+bH: REM \\.\Volume{80cf88c5-8a34-11dd-813c-806d6172696f} \Harddisk5\DP(1)0-0+cI: REM \\.\Volume{80cf88c6-8a34-11dd-813c-806d6172696f} \Harddisk6\DP(1)0-0+dJ: FIX \\.\Volume{98f06d4c-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume3K: FIX \\.\Volume{98f06d4d-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume4L: FIX \\.\Volume{98f06d4e-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume5M: FIX \\.\Volume{98f06d4f-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume6N: REM \\.\Volume{80cf88c3-8a34-11dd-813c-806d6172696f} \Harddisk3\DP(1)0-0+aS: REM \\.\Volume{5d3e8800-9c1f-11dd-8148-001fc6bb76ce} \Harddisk2\DP(1)0-0+5Runnning 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.htmland on the same page there is devioctl.Devioctl with the GEOMETRY <drive> parameters gives the needed info, <drive> can be:drive letterPhysicalDriven(but it won't work -obviously- for Removable devices where no media is inserted )jaclazsymbol2mvol.cmd Edited November 2, 2008 by jaclaz Link to comment Share on other sites More sharing options...
victor888 Posted November 4, 2008 Author Share Posted November 4, 2008 I found one more powerfull disk tool here: http://technet.microsoft.com/zh-cn/sysinte...648(en-us).aspxDiskExt v1.1 which gives each disk it mount volume and drive letters. Link to comment Share on other sites More sharing options...
jaclaz Posted November 4, 2008 Share Posted November 4, 2008 (edited) DiskExt v1.1 which gives each disk it mount volume and drive letters.Yep , but it won't give you ANY more info than mountvol for Removable devices like SD card readers when there is no media in them.....A more useful app is the dd for windows version by John Newbigin:http://www.chrysocome.net/ddtry running dd --listjaclaz Edited November 4, 2008 by jaclaz Link to comment Share on other sites More sharing options...
wimb Posted November 4, 2008 Share Posted November 4, 2008 Almost, but not quite, completely unrelated symbol2mvol.cmdNice presentation Thanks for this HANDY Program wimb Link to comment Share on other sites More sharing options...
victor888 Posted November 5, 2008 Author Share Posted November 5, 2008 In fact ervery thing about disk information is in the registry. I will try to get my answer there and not use others tool. Link to comment Share on other sites More sharing options...
victor888 Posted November 8, 2008 Author Share Posted November 8, 2008 Diskpart and fsutil are no longer needed.I found the secret in registry.I am compositing the batch now. Link to comment Share on other sites More sharing options...
jaclaz Posted November 9, 2008 Share Posted November 9, 2008 Diskpart and fsutil are no longer needed.I found the secret in registry.I am compositing the batch now.GOOD news. jaclaz Link to comment Share on other sites More sharing options...
wim Posted November 19, 2008 Share Posted November 19, 2008 (edited) Hi Jaclaz, function have been added.http://www.msfn.org/board/Switching-drive-...rs-t125992.htmlWim Edited November 21, 2008 by wim Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now