Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Thu, 8 May 2008 02:17:01 -0700,    group: microsoft.public.win32.programmer.wmi        back       


How refresh ACPI temperature?   
Hello,

I want to write a program 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
date: Thu, 8 May 2008 02:17:01 -0700   author:   Harald

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us