Get Serial Number of Boot Drive and other info
I am trying to get the serial number of the boot drive and I haven't figured out how to do it. I do understand that the partition =\= hard drive but I'd like the serial of the boot partition. This what I have so far: var searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMedia"); int i = 0; foreach (ManagementObject wmi_HD in searcher.Get()) { // get the hardware serial no. if (wmi_HD["SerialNumber"] == null) richTextBox1.Text += "None" + Environment.NewLine; else richTextBox1.Text += "Name: " + wmi_HD["Name"] + Environment.NewLine; richTextBox1.Text += "SerialNumber: " + wmi