i'm trying to get physical disks serial number using C# adn WMI
var searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMedia");
foreach (ManagementObject mo in searcher.Get())
{
Console.WriteLine("Serial: {0}", mo["SerialNumber"]);
}
this code show all serial numbers of HDD and flash removable stick, but it fails to get flash removable disk on windows XP and gives me null for the removable disks but get the HDD serial number correctly. any ideas what's wrong ?
my thinking is that windows XP needs update, anyone knows what is the update needed ? i need the specific update to include it with my software.
any other reasons why this happens ?