如何找到系统的硬盘大小 [英] how to find the hardDisk size of my system
本文介绍了如何找到系统的硬盘大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何找到我的系统和配置的硬盘大小?
how to find the hardDisk size of my system & configuration?
推荐答案
使用WMI:包括System.Management程序集:
Use WMI: Include the System.Management assembly:
{
ManagementObjectSearcher mosDisks = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive");
foreach (ManagementObject moDisk in mosDisks.Get())
{
ShowWMIObject("Type: " , moDisk["MediaType"]);
ShowWMIObject("Model: " , moDisk["Model"]);
ShowWMIObject("Serial: " , moDisk["SerialNumber"]);
ShowWMIObject("Interface: " , moDisk["InterfaceType"]);
ShowWMIObject("Capacity: " , moDisk["Size"]);
ShowWMIObject("Partitions: " , moDisk["Partitions"]);
ShowWMIObject("Signature: " , moDisk["Signature"]);
ShowWMIObject("Firmware: " , moDisk["FirmwareRevision"]);
ShowWMIObject("Cylinders: " , moDisk["TotalCylinders"]);
ShowWMIObject("Sectors: " , moDisk["TotalSectors"]);
ShowWMIObject("Heads: " , moDisk["TotalHeads"]);
ShowWMIObject("Tracks: " , moDisk["TotalTracks"]);
ShowWMIObject("Bytes per Sector: " , moDisk["BytesPerSector"]);
ShowWMIObject("Sectors per Track: " , moDisk["SectorsPerTrack"]);
ShowWMIObject("Tracks per Cylinder: " , moDisk["TracksPerCylinder"]);
}
}
private void ShowWMIObject(string p, object o)
{
if (o != null)
{
Console.WriteLine("{0}{1}", p, o);
}
}
根据您的标签,它看起来不像是编程问题.
步骤:
1.右键单击要查看其大小的硬盘
2.选择属性
3.将会打开一个对话框,显示您的已用空间"和可用空间".
Based on your tag, it does not looks like a programming question.
Steps:
1. Right click your hard disk you want to see the size of
2. Select Properties
3. A dialog would open showing you Used space & Free space.
这篇关于如何找到系统的硬盘大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文