WMI: Windows Management Instrumentation
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394586(v=vs.85).aspx
static void MostrarTodo(StringBuilder sb, string cad){
ObjectQuery query = new ObjectQuery("Select * from " + cad);
XmlOpen(sb,1,cad);
ManagementObjectSearcher mos = new ManagementObjectSearcher(query);
if(mos!=null){
ManagementObjectCollection moc = mos.Get();
if(moc != null){
foreach (ManagementObject mo in moc) {
PropertyDataCollection pdc = mo.Properties;
if(pdc != null){
foreach (PropertyData pd in pdc) {
AppendProperty(sb, pd);
}
}else{
sb.AppendLine("");
}
}
}else{
sb.AppendLine("");
}
}else{
sb.AppendLine("");
}
XmlClose(sb,1,cad);
}
Se le llamaría con:
MostrarTodo(sb, "Win32_Desktop");
MostrarTodo(sb, "Win32_DesktopMonitor");
MostrarTodo(sb, "Win32_OperatingSystem");
MostrarTodo(sb, "Win32_StartupCommand");
MostrarTodo(sb, "Win32_LogicalDisk");
MostrarTodo(sb, "Win32_MappedLogicalDisk");
MostrarTodo(sb, "Win32_DiskDrive");
MostrarTodo(sb, "Win32_NetworkAdapter");
MostrarTodo(sb, "Win32_NetworkAdapterConfiguration");