Click here to Skip to main content
15,354,474 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone!
I'm trying to build this small application in VB.NET that would give you information about your PC hardware. From what i'v learned, there is a need to use the WMI classes in order to obtain such information from the computer BIOS. The problem is that i'm trying to find the physical memory type (DDR2/DDR3 etc..) and i couldn't find a WMI class to get that kind of info, although in the BIOS this information is clearly available. I'v already tried the Win32_PhysicalMemory class, but the problem is that it doesn't give any values for speed. Now i'v started to think about other ways to get it, like dividing the virtual memory and the physical memory and to decide what type is the memory according to the answer, but the problem is that it doesn't seem reliable to me!
Another problem is CPU temp, i'v heard that it is impossible to access this kind of information threw VB.NET, and i would love to hear a confirmation about that!

I would appreciate to get some help!
thanks alot!

1 solution

The Win32_PhysicalMemory WMI class does have the MemoryType property that at least supports DDR-2 (might be updated as of late). See[^]. Are you not seeing this? I do see it on my Win7 box.

CPU temperature is reported differently for different motherboard manufacturers. If they haven't implemented a WMI provider for the temperature, you can't get it without a specific driver and ability to access it. MSAcpi_ThermalZoneTemperature may work for some motherboards, but also only seems to be updated during high temperature events.
Member 8078870 13-Jul-11 9:09am
I'v seen the memorytype, but the problem is that it gives me wrong answers! for example I have a DDR2 memory on my computer, and the value i get from WMI is SDRAM, so it's not really reliable!
and what about the speed of the memory? there is also "speed" under the physicalmemory class but it doesn't return any value at all
Heath Stewart 14-Jul-11 14:07pm
Unforutnately, it all depends on what motherboards support and how they expose the information. Seems rather unfortunate it's not standardized given what WMI (or CMI in general) is for.
Member 8078870 14-Jul-11 16:54pm
but it's weird.. how come other programs like cpu-id can do it with any motherboard? maybe the issue is just that VB.NET isn't powerful enough...
Heath Stewart 18-Mar-12 23:52pm
It has nothing to do with "power". It's a matter of what is exposed for the API to call, or how much information you store within your own program you write in any language. Changes are that this cpu-id probably has data on a lot of different motherboard manufacturers, and what they can glean from low-level calls along with that data provides an answer. The WMI provider implementation apparently didn't go to that length.

You can search the Internet and read up on detecting DDR2 yourselves. All sources I've found say it's not standard.
agung setio p 18-Mar-12 20:21pm
It's true, not powerful enough

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900