惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
A
About on SuperTechFans
量子位
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
Microsoft Azure Blog
Microsoft Azure Blog
V
V2EX
Google DeepMind News
Google DeepMind News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog
U
Unit 42
D
DataBreaches.Net
博客园 - Franky
D
Docker
宝玉的分享
宝玉的分享
Y
Y Combinator Blog
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Hugging Face - Blog
Hugging Face - Blog

博客园 - 浪剑

[转]我省多元化军民融合金融创新服务体系正加快形成 C#中通过wmi获取硬件的信息 Windows服务中如何播放声音 一个根据根据输入内容自动匹配的下来列表框,且支持拼音字母 一个动态添加DataGridView列的函数 win7下如何配置ODBC数据源 串口小票打印机调试命令 [转]利用FtpClient类实现文件的上传下载功能 关于生成GUID [导入]CSS基本布局16例 [导入]网易娱乐频道也在用风讯CMS [导入]ASP.NET26个常用性能优化方法 [导入]如何构造一个C#语言的爬虫蜘蛛程序 javascript控制cookies及在跳出本页给出提示,是否放弃操作!! - 浪剑 - 博客园 RunOnBeforeUnload() 在程序里面(服务器端)调用Winrar压缩文件的方法?另寻求一条语句转换的方法。vb.net到C#。 javascript控制图片的百叶窗效果 在ASP.NET中显示进度条 [转]ASP.Net+XML打造留言薄
C#中通过WMI的Win32_DiskDrive对象获取磁盘驱动器信息简介
浪剑 · 2014-04-03 · via 博客园 - 浪剑

1、简介

     在WMI中,通过Win32_DiskDrive对象可以获取磁盘驱动器的相关信息:

      ManagementClass mc = new ManagementClass("Win32_DiskDrive");
      ManagementObjectCollection moc = mc.GetInstances();
      foreach (ManagementObject mo in moc)
      {
            propertyInfo = mo.Properties[PropertyName].Value.ToString();
      }

2、属性名

     Win32_DiskDrive对象的属性名如下:

     Availability
     BytesPerSector
     Capabilities
     CapabilityDescriptions
     Caption
     CompressionMethod
     ConfigManagerErrorCode
     ConfigManagerUserConfig
     CreationClassName
     DefaultBlockSize
     Description
     DeviceID
     ErrorCleared
     ErrorDescription
     ErrorMethodology
     FirmwareRevision
     Index
     InstallDate
     InterfaceType
     LastErrorCode
     Manufacturer
     MaxBlockSize
     MaxMediaSize
     MediaLoaded
     MediaType
     MinBlockSize
     Model
     Name
     NeedsCleaning
     NumberOfMediaSupported
     Partitions
     PNPDeviceID
     PowerManagementCapabilities
     PowerManagementSupported
     SCSIBus
     SCSILogicalUnit
     SCSIPort
     SCSITargetId
     SectorsPerTrack
     SerialNumber
     Signature
     Size
     Status
     StatusInfo
     SystemCreationClassName
     SystemName
     TotalCylinders
     TotalHeads
     TotalSectors
     TotalTracks
     TracksPerCylinder

posted @ 2014-04-03 12:00  浪剑  阅读(1061)  评论()    收藏  举报