H
Harald
Hello,
I want to write a utility which allow me to read the CPU temperature. My
notebook is an old ThinkPad 600X (PIII 650 MHz) and is ACPI compliant.
I use WMI and the class MSAcpi_ThermalZoneTemperature . Please see my VBS:
strComputer = "."
wmiNS = "\root\wmi"
wmiQuery = "Select * from MSAcpi_ThermalZoneTemperature"
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objLocator.ConnectServer(strComputer, wmiNS)
Set colItems = objWMIService.ExecQuery(wmiQuery)
For Each objItem in colItems
With objItem
wscript.echo "CurrentTemperature: " & .CurrentTemperature
wscript.echo "InstanceName: " & .InstanceName
wscript.echo " "
End With
Next
It works but it does not refresh the temperature. I get always the same
temperature. Only after Reboot I get other values.
Is there a way to force WMI to refresh the ACPI data?
Thanks for your help!
Harald
I want to write a utility which allow me to read the CPU temperature. My
notebook is an old ThinkPad 600X (PIII 650 MHz) and is ACPI compliant.
I use WMI and the class MSAcpi_ThermalZoneTemperature . Please see my VBS:
strComputer = "."
wmiNS = "\root\wmi"
wmiQuery = "Select * from MSAcpi_ThermalZoneTemperature"
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objLocator.ConnectServer(strComputer, wmiNS)
Set colItems = objWMIService.ExecQuery(wmiQuery)
For Each objItem in colItems
With objItem
wscript.echo "CurrentTemperature: " & .CurrentTemperature
wscript.echo "InstanceName: " & .InstanceName
wscript.echo " "
End With
Next
It works but it does not refresh the temperature. I get always the same
temperature. Only after Reboot I get other values.
Is there a way to force WMI to refresh the ACPI data?
Thanks for your help!
Harald