日期:2014-05-18  浏览次数:21332 次

请教下ManagementObject这个类的相关属性
该对象好像还有根据名称索引相对应的数据

如 foreach (ManagementObject disk in searcher.Get())
  {
  //获取驱动器盘符
  disk.
  this.treeBigList.Nodes.Add(disk["Name"].ToString(), disk["Size"].ToString());
  MessageBox.Show("Description: " + disk["Description"]);
  MessageBox.Show("File system: " + disk["FileSystem"]);
  MessageBox.Show("Free disk space: " + disk["FreeSpace"]);
  MessageBox.Show("Size: " + disk["Size"]);  
  } 

//除了size,name,description,filesystem,freespace还有没有其他的??

最好能够给各详细网址进行参考

------解决方案--------------------
路过,帮up
------解决方案--------------------
还多得很:
C# code
class Win32_LogicalDisk : CIM_LogicalDisk 
{
 uint16 Access;
 uint16 Availability;
 uint64 BlockSize; 
string Caption; 
boolean Compressed;
 uint32 ConfigManagerErrorCode;
 boolean ConfigManagerUserConfig;
 string CreationClassName;
 string Description;
 string DeviceID;
 uint32 DriveType;
 boolean ErrorCleared;
 string ErrorDescription;
 string ErrorMethodology;
 string FileSystem;
 uint64 FreeSpace;
 datetime InstallDate;
 uint32 LastErrorCode;
 uint32 MaximumComponentLength;
 uint32 MediaType;
 string Name;
 uint64 NumberOfBlocks;
 string PNPDeviceID;
 uint16 PowerManagementCapabilities[];
 boolean PowerManagementSupported;
 string ProviderName;
 string Purpose;
 boolean QuotasDisabled;
 boolean QuotasIncomplete;
 boolean QuotasRebuilding;
 uint64 Size;
 string Status;
 uint16 StatusInfo;
 boolean SupportsDiskQuotas;
 boolean SupportsFileBasedCompression;
 string SystemCreationClassName;
 string SystemName;
 boolean VolumeDirty;
 string VolumeName;
 string VolumeSerialNumber;
 };

------解决方案--------------------
以前查过这方面的资料,保存下来的。。
不过刚刚发现资料里保存着地址,把它发出来,楼主自己去看看:
http://msdn.microsoft.com/en-us/library/aa394173(VS.85).aspx
------解决方案--------------------
友情UP
------解决方案--------------------
http://msdn.microsoft.com/en-us/library/aa394572(VS.85).aspx
http://en.wikipedia.org/wiki/Windows_Management_Instrumentation