hi all i have this great code that i love that will display the kind of processor model and speed like so
RegistryKey Rkey = Registry.LocalMachine;
Rkey = Rkey.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0");
Labelproc.Text = (string)Rkey.GetValue("ProcessorNameString");
and i was wondering if theres a way to do this for the kind of graphics card and the total installed system ram (in separate labels)
Rather than reading the registry I’d suggest that you use WMI, specifically
Win32_ComputerSystemto find number of CPUs andWin32_Processorto find info about it andWin32_ComputerSystem.TotalPhysicalMemorywould give the RAM.I’m sure there is some way to pick up the graphics card(s) as well (remember that there might be more than one).
Here’s an article with some samples for getting out various data:
http://msdn.microsoft.com/en-us/library/aa394587%28VS.85%29.aspx
The samples are in vbscript but it’s similar, I think the C# code for getting the RAM would be something like: