Reputation: 155
I have read an almost exact same question regarding this issue already (WMI hardware, get RAM info), and here I'm hoping for more information on this topic.
I need to get various hardware information such as RAM serial number, hard drive SN, CPU SN, etc. I am using Visual C++ 2010 and using WMI to query for the information, but it's not giving me what I want. For example, I started trying to get RAM SN, and after querying for it (I used Win32_PhysicalMemory then I get the property "SerialNumber"), I get
SerialNumber
SerNum0
SerNum1
which is obviously not it. I also went to the command line for it (wmic memorychip get serialnumber), but I get the same thing. But I know the serial number is there; when I use a 3rd party program CPU-Z, it retrieves the RAM serial numbers flawlessly.
Am I querying the wrong class? Is there anything I'm missing? I have tried the executable I made on multiple other computers, with mixed results of success and failure--but CPU-Z never fails.
I am developing in Visual Studio C++ 2010 on Windows 7 64 bit computer. Thanks.
Upvotes: 4
Views: 1320
Reputation: 136391
The WMI get the data using the WMI providers, unfortunately some manufacturers doesn't expose such data to these providers so you are out luck here. If you want a reliable method to obtain some memory info like serial numbers, manufacturer and so on, you can use the Serial presence detect (SPD) like CPU-Z does. You can get all the documentation related to SPD from the jedec site.
Upvotes: 3