I need to get complete information on the memory modules. I tried to do this via WMI:

ManagementObjectSearcher searcher12 = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_PhysicalMemory"); Console.WriteLine("------------- Win32_PhysicalMemory instance --------"); foreach (ManagementObject queryObj in searcher12.Get()) { Console.WriteLine( "BankLabel: {0} ; Capacity: {1} Gb; Speed: {2}; Manufacturer: {3}; Serial Number: {4}", queryObj["BankLabel"], Math.Round(System.Convert.ToDouble(queryObj["Capacity"]) / 1024 / 1024 / 1024, 2), queryObj["Speed"], queryObj["Manufacturer"], queryObj["Name"]); } 

But this value is simply not there. Are there any other ways to find out this data?

  • There is a suspicion that if you get access to the I2C bus, you will get everything you need and even more. But this is not C # almost certainly - Vladimir Martyanov
  • This name may not be, if the memory is NoName, with honest brand straps, there are usually no such problems. In general, any data other than the values ​​of the technical parameters that are needed for proper setup are not required to be present, this is additional information that the manufacturer can provide on its devices, or it may not provide as he wants, this does not affect the work. With high probability on the memory levels themselves, you also have no information about the manufacturer. - rdorn

1 answer 1

 var connection = new ConnectionOptions() { Impersonation = ImpersonationLevel.Impersonate }; var scope = new ManagementScope("\\root\\CIMV2", connection); var query = new ObjectQuery("SELECT * FROM Win32_PhysicalMemory"); scope.Connect(); var searcher = new ManagementObjectSearcher(scope, query); foreach (ManagementObject queryObj in searcher.Get()) { Console.WriteLine("____________________"); foreach (PropertyData data in queryObj.Properties) Console.WriteLine(data.Name + "\t" + data.Value); } 

Output:

 ____________________ BankLabel BANK 0 Capacity 4294967296 Caption Physical Memory CreationClassName Win32_PhysicalMemory DataWidth 64 Description Physical Memory DeviceLocator ChannelA-DIMM0 FormFactor 8 HotSwappable InstallDate InterleaveDataDepth 2 InterleavePosition 1 Manufacturer Kingston MemoryType 0 Model Name Physical Memory OtherIdentifyingInfo PartNumber 99U5402-052.A00LF PositionInRow PoweredOn Removable Replaceable SerialNumber 4E1ECEFF SKU Speed 1600 Status Tag Physical Memory 0 TotalWidth 64 TypeDetail 128 Version 
  • The fact is that the name of my card is not displayed. And I need to pull it out somehow - Daniel Bondarenko