0 Replies Latest reply on Aug 31, 2010 11:27 PM by paulsm

    Unable to check CPU temperature on Intel DH57jg

    paulsm

      Hi -

       

      We have an Intel DH57jg motherboard running Windows Embedded Standard 7.  We're trying to make some WMI queries.

       

      The same program works OK, on other PCs with different hardware, and different versions of Windows.  The program works on WES7 for Disk Usage (Win32_LogicalDisk) and system info (Win32_ComputerSystem).  But when I query for "MSAcpi_ThermalZoneTemperature", I get the WMI error "not supported".

       

      The same .exe works fine on Windows/XP and Windows Vista (as long as I "run as administrator"), but fails on this combination of Intel board and WES7 OS.

       

      Q: Does anybody know how to enable CPU temperature monitoring on this board?

       

      Q: Is it a motherboard issue, or a Windows Embedded issue?

       

      Thank you in advance!

       

      PS:
      Here's the code (Delphi; but could just as easily be VB, C# or WSH):

       

          ...
          type
            TForm1 = class(TForm)
              ...
              FwmiServices : ISWbemServices;
              FwmiObjSet : ISWbemObjectSet;
              procedure QueryDisk;
              procedure QuerySysInfo;
              procedure QueryTemperature;
              procedure SetQueryDefaults;
              procedure MakeQuery;
              ...
            end;
            ...
         
          procedure TForm1.MakeQuery;
          begin
            FwmiServices := CoSWbemLocator.Create.ConnectServer(
              leServerHostname.Text,  // strServer
              leServerNamespace.Text, // strNamespace
              '',   // strUser
              '',   // strPassword
              '',   // strLocale
              '',   // strAuthority
              0,    // iSecurityFlags
              nil   // objWbemNamedValueSet
              );
            FwmiObjSet := FwmiServices.ExecQuery (
              leWMIQuery.Text, // strQuery
              'WQL', // strQueryLanguage
              0,     // iFlags
              nil    // objWbemNamedValueSet
              );
          ...
          procedure TForm1.QueryTemperature;
          var
            e : IEnumVariant;
            nRecs : Cardinal;
            v : OleVariant;
            sTemp : String;
            iTemp : Longword;
          begin
            try
              MakeQuery;
              e := IUnknown (FwmiObjSet._NewEnum) as IEnumVariant;
              while (e.Next (1, v, nRecs) = 0) do begin
                sTemp := VarToStr (v.CurrentTemperature);
                iTemp := v.CurrentTemperature;
                Log ('sTemp: ' + sTemp +
                  ', iTemp: ' + IntToStr (iTemp) +
                  ', Fahrenheit= ' + FloatToStr ( ((9.0/5.0)*((iTemp - 2732.0)/10.0)) + 32.0));
                end;
              Log ('');
            except
              on e : Exception do
                Log ('ERROR: ' + e.Message);
            end;
            FwmiObjSet := nil;
            FwmiServices := nil;
          end;