Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows VistaWindows XPWindows MeWindows 98Windows 95Virtual PCInternet ExplorerOutlook ExpressWindows MediaSecurity
Related Topics
MS Server ProductsMS OfficePC HardwareMore Topics ...

Windows Forum / Windows XP / Hardware / May 2008

Tip: Looking for answers? Try searching our database.

How refresh the ACPI thermal zone temperature?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Harald - 08 May 2008 08:59 GMT
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
VanguardLH - 08 May 2008 10:11 GMT
> Hello,
>
[quoted text clipped - 26 lines]
>
> Harald

Guess I missed the part of the name of this newsgroup that says it deals
with programming issues.

See:  microsoft.public.vb.*

Where is the refresh method, like on the whatever panel uses this code?
How about the DoEvents on the app?  I'm sure the VB newsgroups can
answer how to refresh your panel and when to do so but you might want to
provide more context than this code snippet.
Harald - 08 May 2008 12:40 GMT
Hello,

it does not work with the Refresh method and the DoEvents. It is much more
complex. I searched in the web for hours, and I find only people with the
same problem, but no ansers.

Maybe I post the question also in the developer forum.

Thanks

Harald

> > Hello,
> >
[quoted text clipped - 36 lines]
> answer how to refresh your panel and when to do so but you might want to
> provide more context than this code snippet.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.