using system;
using system.management;
using system.collections;
using system.collections.specialized;
using system.text;
namespace rainsoft.management
#endregion
///
/// 獲取系統資訊
///
///
///
/// wmi w = new wmi(wmipath.win32_networkadapterconfiguration);
/// for (int i = 0; i < w.count; i ++)
/// ", w[i, "caption"]);
/// console.writeline("mac address:", w[i, "macaddress"]);
/// }
/// }
///
///
public sealed class wmi
} ///
/// 獲取指定屬性值,注意某些結果可能是陣列。
///
public object this[int index, string propertyname]
catch
} } ///
/// 返回所有屬性名稱。
///
///
///
public string propertynames(int index)
catch
} ///
/// 返回測試資訊。
///
///
public string test()
} } }
return result.tostring();
} catch
} ///
/// 建構函式
///
///
public wmi(string path)
ok = true;
mo.dispose();
} moc.dispose();
} catch(exception e)
} ///
/// 建構函式
///
///
public wmi(wmipath path): this(path.tostring())
} }
C 獲取電腦硬體資訊
獲取cpu編號 view plaincopy to clipboardprint?managementclass mc new managementclass win32 processor managementobjectcollection moc mc.getinstances string ...
獲取電腦硬體資訊
csharp csharp csharp csharp using system using system.collections using system.management namespace hardwareinfos public static hashtable getallinfos ...
vbs wmi獲取電腦硬體資訊例項
set wmi getobject winmgmts 程式設計客棧 setoepgjpyab board wmi.instancesof win32 baseboard for each b in board msg 主機板 b.manufacturer vbtab b.product vbtab ...