Et voila:
public static void ReadDiskSerialNumber(StringBuilder sb)
{
ManagementObjectSearcher ms =
new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_LogicalDisk");
foreach (ManagementObject o in ms.Get())
{
try
{
sb.AppendLine(o.GetPropertyValue("VolumeSerialNumber").ToString());
}
catch { }
}
}
public static void ReadMainBoardSerialNumber(StringBuilder sb)
{
ManagementObjectSearcher ms =
new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_BaseBoard");
foreach (ManagementObject o in ms.Get())
{
try
{
sb.AppendLine(o.GetPropertyValue("SerialNumber").ToString());
}
catch { }
}
}
public static void ReadNetworkAdapterMacAddress(StringBuilder sb)
{
ManagementObjectSearcher ms =
new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_NetworkAdapterConfiguration");
foreach (ManagementObject o in ms.Get())
{
try
{
sb.AppendLine(o.GetPropertyValue("MacAddress").ToString());
}
catch { }
}
}
Ci sono poi moltissime altre chiavi di ricerca per le quali ti conviene guardare la doumentazione, comunque queste dovrebbero bastarti.