- 积分
- 6286
- 明经币
- 个
- 注册时间
- 2003-5-19
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2014-12-3 22:37:16
|
显示全部楼层
本帖最后由 mmmmmm 于 2014-12-4 15:52 编辑
应该可以很容易知道系统盘的盘符,然后尝试使用"Win32_LogicalDiskToPartition",通过枚举DISK的"Properties_"属性,可以找到信息类似这样:
((("StartingAddress" . "85904856576")
("EndingAddress" . "292071467519")
("Dependent"
.
"\\\\TZ-GBKGLV1\\root\\cimv2:Win32_LogicalDisk.DeviceID=\"G:\""
)
("Antecedent"
.
"\\\\TZ-GBKGLV1\\root\\cimv2:Win32_DiskPartition.DeviceID=\"Disk #0, Partition #1\""
)
)
(("StartingAddress" . "292071499776")
("EndingAddress" . "500105249279")
("Dependent"
.
"\\\\TZ-GBKGLV1\\root\\cimv2:Win32_LogicalDisk.DeviceID=\"E:\""
)
("Antecedent"
.
"\\\\TZ-GBKGLV1\\root\\cimv2:Win32_DiskPartition.DeviceID=\"Disk #0, Partition #1\""
)
)
(("StartingAddress" . "85904856576")
("EndingAddress" . "292071467519")
("Dependent"
.
"\\\\TZ-GBKGLV1\\root\\cimv2:Win32_LogicalDisk.DeviceID=\"D:\""
)
("Antecedent"
.
"\\\\TZ-GBKGLV1\\root\\cimv2:Win32_DiskPartition.DeviceID=\"Disk #0, Partition #1\""
)
)
(("StartingAddress" . "32256")
("EndingAddress" . "85904824319")
("Dependent"
.
"\\\\TZ-GBKGLV1\\root\\cimv2:Win32_LogicalDisk.DeviceID=\"C:\""
)
("Antecedent"
.
"\\\\TZ-GBKGLV1\\root\\cimv2:Win32_DiskPartition.DeviceID=\"Disk #0, Partition #0\""
)
)
)
里面有详细的各个磁盘对应的硬盘及其分区编号 |
|