I use Hard-Drive Serial-Number check to register my products.
But I see that sometimes it's being changed. Just 2 weeks after the client has activated the product, the hard-drive Serial-Num changed.
Is this property changeable? and if so, how when and why is it changed?
Here is the code i use in VB:
Dim WMIService As Object, Items As Object, SubItems As Object, temp
Set WMIService = GetObject("winmgmts:\\" & "." & "\root\cimv2")
Set Items = WMIService.ExecQuery("Select * from Win32_PhysicalMedia", , 48)
For Each SubItems In Items
temp = SubItems.SerialNumber
If LenB(temp) Then Exit For
Next
and the same thing i use in C#
using System.Management;
public string GetHDDSerial()
{
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMedia");
foreach (ManagementObject wmi_HD in searcher.Get())
{
// get the hardware serial no.
if (wmi_HD["SerialNumber"] != null)
return wmi_HD["SerialNumber"].ToString();
}
return string.Empty;
}