驱动器写入物理驱动器映射,如同C属于physicaldrive0,F属于物理驱动器1 [英] Drive Letter To Physical Drive Mapping , Like C belongs to physicaldrive0, F belongs to physical Drive 1
本文介绍了驱动器写入物理驱动器映射,如同C属于physicaldrive0,F属于物理驱动器1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我很困惑,真的不知道该怎么做,因为在WMI课程中没办法做到这一点
你有什么想法???
i am totally confused and really dont know how to do this because there is no way in WMI class for do this
Do You have any Idea ???
推荐答案
您需要使用关联类Win32_DiskDriveToDiskPartition
和Win32_LogicalDiskToPartition
将物理磁盘与卷关联:
http://blogs.technet.com/b/heyscriptingguy/archive/2005/05/23/how-can-i-correlate-logical- drives-and-physical-disks.aspx [ ^ ]
You need to use the association classesWin32_DiskDriveToDiskPartition
andWin32_LogicalDiskToPartition
to correlate a physical disk with a volume:
http://blogs.technet.com/b/heyscriptingguy/archive/2005/05/23/how-can-i-correlate-logical-drives-and-physical-disks.aspx[^]
所有WMI类都涵盖了所有。问题是您对磁盘使用方式的理解。不像你想的那样。 驱动器号与磁盘驱动器无关。它们与逻辑卷关联,因此该类为CIM_StorageVolume
。驱动器细分为分区,等等。要使用WMI,你需要全部学习它们。
对于所有这些对象的WMI表示,你可以从这样的地方开始
http://msdn.microsoft.com/en-us /library/aa394132%28v=vs.85%29.aspx [ ^ ]
然后找到所有其他相关类:
http://msdn.microsoft.com/en-us/library/aa394570%28v=vs .85%29.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/aa394388%28v=vs.85%29.aspx [ ^ ]。
-SA
There are all the WMI classes to cover it all. The problem is your understanding of how a disk is used. Not as you think. The drive letters are not associated with disk drives. They are associated with logical volumes, so the class isCIM_StorageVolume
. The drive is subdivided into partitions, and so one. To use WMI, you need to learn them all.
As to WMI representation of all those objects, you can start from a place like this one
http://msdn.microsoft.com/en-us/library/aa394132%28v=vs.85%29.aspx[^]
and then find all the other relevant classes:
http://msdn.microsoft.com/en-us/library/aa394570%28v=vs.85%29.aspx[^],
http://msdn.microsoft.com/en-us/library/aa394388%28v=vs.85%29.aspx[^].
—SA
这篇关于驱动器写入物理驱动器映射,如同C属于physicaldrive0,F属于物理驱动器1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文