From: Edward QU Date: 2012-07-01T18:18:24+09:00 Subject: Cannot get proper query CPU Temperature under win7-64bit hello: I Can't query CPU proper Temperature (MSAcpi_ThermalZoneTemperature) on Windows 7 64 bit using wmi. The temperature I got is the mother board's. The laptop is ASUS UX21e,Intel® Core™ i7 2677M Processor,Genuine Windows® 7 Professional 64bit,Intel® QS67 Express Chipset. The program is as the following: require 'win32ole' wmi = WIN32OLE.connect("winmgmts://./root/wmi") qry = wmi.execquery("select * from MSAcpi_ThermalZoneTemperature" ) qry.each { |i| $now_temp_k= i.send("CurrentTemperature") $now_temp_c=($now_temp_k - 2732) / 10 $critical_temp_k= i.send("CriticalTripPoint") $critical_temp_c=($critical_temp_k - 2732) / 10 } puts "Current CPU Temperature: #{$now_temp_c} Centigrade ,Critical Trip Point is #{$critical_temp_c} Centigrade." Any help would be appreciated! Regards Edward -- Posted via http://www.ruby-forum.com/.