Geeks With Blogs


INauseous() Shawn Cicoria - Solution Architect, Craftsman and Artisan - INauseous() - Main Blog Here:

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


Posted on Wednesday, January 31, 2007 5:12 PM | Back to top

Comments on this post: CPU Temperature Monitor and Script

Comments are closed.
Comments have been closed on this topic.
Copyright © Shawn Cicoria | Powered by: