DriveInfo和Win32_DiskPartition分区映射 [英] DriveInfo and Win32_DiskPartition partition mapping

查看:280
本文介绍了DriveInfo和Win32_DiskPartition分区映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我正在使用DriveInfo和Win32_DiskPartition来获取每个物理磁盘驱动器的分区,但问题是我可以信任Windows分区映射,磁盘#0分区#0始终是C:/等等吗?

Hello I'm using DriveInfo and Win32_DiskPartition to get partitions of each physical disk drives, but question is can I trust windows partition mapping that Disk #0 Partition #0 always be C:/ and so on?

推荐答案

没有。磁盘/分区信息是物理驱动器信息(控制器,端口)。这与驱动器的逻辑结构无关。 

No. The Disk/partition information is the physical drive information (controller, port). This has nothing to do with the logical structure of the drives. 

不幸的是,通过WMI获取此信息很困难。回到
2005
脚本专家将这个脚本放在一起,但即便如此,他们也警告说它没有多大意义。

Unfortunately getting this information via WMI is difficult. Way back in 2005 the Scripting Guys put together this script but even then they warned that it didn't make a lot of sense.


这篇关于DriveInfo和Win32_DiskPartition分区映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆