title: Get Hard disk serial Number
body: <p>I want to get hard disk serial number. How I can I do that?
  I tried with two code but I am not getting</p>
  
  <pre><code>StringCollection propNames = new StringCollection();
  ManagementClass driveClass = new ManagementClass("Win32_DiskDrive");
  PropertyDataCollection  props = driveClass.Properties;
  foreach (PropertyData driveProperty in props) 
  {
      propNames.Add(driveProperty.Name);
  }
  int idx = 0;
  ManagementObjectCollection drives = driveClass.GetInstances();
  foreach (ManagementObject drv in drives)
         {
            Label2.Text+=(idx + 1);
            foreach (string strProp in propNames)
             {
              //Label2.Text+=drv[strProp];
           Response.Write(strProp + "   =   " + drv[strProp] + "&lt;/br&gt;");
            }
      }
  </code></pre>
  
  <p>In this one I am not getting any Unique Serial number.<br>
  And Second one is </p>
  
  <pre><code>string drive = "C";
  ManagementObject disk = new ManagementObject("win32_logicaldisk.deviceid=\"" + drive + ":\"");
  disk.Get();
  Label3.Text = "VolumeSerialNumber="+ disk["VolumeSerialNumber"].ToString();
  </code></pre>
  
  <p>Here I am getting <code>VolumeSerialNumber</code>. But it is not unique one. If I format the hard disk, this will change. How Can I get this?</p>