CPU Temperature

Posted on 2006-06-02
Last Modified: 2009-05-15
I have looked high and low for some example on how to get the CPU temperature or even MB temp in C#. I even looked into API calls but I cannot find any reference in kernel32 for temp sensor readings. I also tried WMI but to no avail. Maybe I am doing it wrong but this is what I have so far for WMI.

                string query = "SELECT * FROM Win32_TemperatureProbe";

                ManagementObjectSearcher moSearch = new ManagementObjectSearcher(query);
                ManagementObjectCollection moCollection = moSearch.Get();

                foreach (ManagementObject mo in moCollection)
                    txtLog.Text += mo["Caption"].ToString();

When debugging it never gets to the txtLog.Text line so it must have not collected anything. I know for a fact this system has temperature sensors for the CPU and motherboard. I do not mind API calls but if I could find out how to access it I would be a happy person.

Thanks for the help...anyone!
Question by:JoeDW
    LVL 3

    Accepted Solution

    Try the C or C++ form, you'll have a much better chance of finding someone who knows how to do it.  That's a pretty low level process, I'd be suprised if C# had a direct way to do it.
    LVL 1

    Author Comment

    That's what I was afraid of, thanks anyways!


    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Article by: Ivo
    C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now