private void Form1_Load(object sender, EventArgs e)
{
string message = string.Empty;
SelectQuery Query = new SelectQuery("Select * from Win32_BaseBoard");
ManagementObjectSearcher driveID = new ManagementObjectSearcher(Query);
ManagementObjectCollection.ManagementObjectEnumerator data = driveID.Get().GetEnumerator();
data.MoveNext();
ManagementBaseObject board = data.Current;
message += "主板制造商:" + board.GetPropertyValue("Manufacturer").ToString().Trim() + "/n";
message += "主板编号:" + board.GetPropertyValue("SerialNumber").ToString().Trim() + "/n";
message += "主板版本型号:" + board.GetPropertyValue("Product").ToString().Trim() + "/n";
MessageBox.Show(message);
this.Close();
}
如何获取主板的相关信息 包括主板编号、版本、制造商
最新推荐文章于 2020-05-08 21:39:52 发布