CPU Temperature Monitor and Script
In my posts regarding the CPU monitor I posted a VBS script that would dump the values from WMI. That script incorrectly prints the wrong property name. It is also displaying the temperature in kelvin not Celsius
The conversion is:
static decimal ConvertToCelsius( string reading )
{
//It's recorded in 10ths of Kelvin
return ( decimal.Parse( reading ) / 10 - 273.15m );
}
''''On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI")
Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM MSAcpi_ThermalZoneTemperature",,48)
For Each objItem in colItems
Wscript.Echo "-----------------------------------"
Wscript.Echo "MSAcpi_ThermalZoneTemperature instance"
Wscript.Echo "-----------------------------------"
Wscript.Echo "CurrentTemperature:(Kelvin x 0.1) " & objItem.CurrentTemperature
Wscript.Echo "Critical Trip Point:(Kelvin x 0.1) " & objItem.CriticalTripPoint
Wscript.Echo "Thermal Stamp: " & objItem.ThermalStamp
Next