I need to know how I can get RAM (Physical memory) serial number. I am using C# and I used WMI to get Hardware information but serial Number return null on another computers. I want to know how can I get it and work on any computer (not WMI) and if there is no another way can I write it in C++ and make connection between this function and my application?
This is some of my code:WqlObjectQuery Memory3_objectQuery = new WqlObjectQuery('Select * from Win32_PhysicalMemory');ManagementObjectSearcher Memory3_Searcher = new ManagementObjectSearcher(Memory3_objectQuery);foreach (ManagementObject MO2 in Memory3_Searcher.Get()){
![Memory Memory](https://ssd.toshiba-memory.com/images/serial_number_sample.081616.png)
1 Answer
Not the answer you're looking for? Browse other questions tagged c#-3.0 or ask your own question.
I am suspicious about the RAM upgraded(not sure whether the person added new or used). i.e. I want to check serial number of the RAM with built date.
Platform-Windows 7.
I tried this with 'wmic memorychip get serialnumber' but it shows blank.
--Output of Get-WmiObject -Class win32_physicalmemory | fl *
2 Answers
CPUID's CPUZ does it, see the SPD Tab:
http://www.cpuid.com/
http://www.cpuid.com/downloads/cpu-z/cpu-z_1.75-en.zip
edit:
I was curious now and googled a lot to see what seems to be the limits of writing some hardware inventory scripts including powershell and .NET /C#.
Obviously it is 'safe' to read the information from the SMBIOS which include nearly everything from the DRAM SPD except the manufactured date.CPUZ seems to hack over SMBUS/I2C(?) being very close to hardware to get the date, which is not supported by MS for my understanding.
For everyone with some dev experience, I'd recommend to check this nice project with full source. Besides many sensors it also reads the SMBIOS like the Class win32_physicalmemory does. Despite the powershell script, it needs elevated user rights.https://github.com/openhardwaremonitor/openhardwaremonitor
Use Powershell to query for the serialnumbers of your RAM memory, unfortunately the creation date is not avaiable with PowerShell.
Take a look at this:
Use Get-WmiObject -Class win32_physicalmemory | fl *
to check the various properties that the win32_physicalmemory
class returns. Maybe you can find some other useful stuff.
To check the serialnumbers of your RAM memory with CPU-Z, download it from here. Install, and start the application.
Finally click on the SPD
tab to view the serialnumber, creationdate, manufacturer etc. With the slots pull-down menu you can select the modules present in your machine.
Here's an example:
Not the answer you're looking for? Browse other questions tagged windows-7serial-number or ask your own question.
Memory Serial Number Lookup
This post explains how to find serial number for various hardware devices – RAM, Hard disk, Motherboard on a computer. We can use WMIC command to find this information. These commands can be executed from Windows command prompt.
Get serial number of RAM chips.
This command lists serial number for each RAM module installed on the computer. Example below.
Get serial number for hard disks
Example:
Get serial number for mother boards
Get Serial number for cdrom drive
Replace ‘d:’ with the drive letter for the cdrom on your computer. You get error ‘No Instance(s) available’ if you don’t have CDROM drive on your computer.
This is some of my code:WqlObjectQuery Memory3_objectQuery = new WqlObjectQuery('Select * from Win32_PhysicalMemory');ManagementObjectSearcher Memory3_Searcher = new ManagementObjectSearcher(Memory3_objectQuery);foreach (ManagementObject MO2 in Memory3_Searcher.Get()){
![Ram serial number Ram serial number](https://img2.owcnow.com/imgs/ndesc/memory/PC100/OWC100SO256168L.jpg)