How do I read system properties in WPF (I am programming in C# 4.0, VS2010) ? I want to display information about OS, CPU and GPU..
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends how far you want to go. If you want the most accurate data, use the System.Management class to call WMI Queries. However, if you really just want system info (static), then the System.Environment class (as suggested by Haris would be fine).
Win32_OperatingSystem has a lot of useful operating system data:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394239%28v=vs.85%29.aspx
Win32_Processor will get you all the necessary processor information:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394373%28v=vs.85%29.aspx
If you are looking for live metrics you will need to use the Raw Performance Counters found in Win32_PerfRawData_PerfOS_Processor:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394317%28v=vs.85%29.aspx
There is plenty more you can do.