Board logo

标题: VBS获取CPU当前温度 [打印本页]

作者: somebody    时间: 2007-11-10 01:58     标题: VBS获取CPU当前温度

不准...
  1. Dim u, s, CPUTemperature
  2. Set mCPU=GetObject("winmgmts:{impersonationLevel=impersonate}!root\wmi").ExecQuery("Select CurrentTemperature From MSAcpi_ThermalZoneTemperature")   
  3.      For Each u In mCPU   
  4.          s=s&u.CurrentTemperature
  5.      Next
  6. Set mCPU=Nothing
  7. CPUTemperature=(s-2732)/10
  8. MsgBox "The Current Temperature of Your CPU is: "&CPUTemperature&"℃"
复制代码

作者: xxx3212    时间: 2007-12-22 10:14

我的是xp
运行不鸟 出错了
作者: ieutk    时间: 2007-12-22 11:07

我的也是XP,但是可以正常运行
作者: qq191035066    时间: 2009-2-5 13:01

我的也是XP,但是不可以正常运行,说脚本宿主!
作者: hkmhd    时间: 2009-2-5 13:31

运行出错……楼主自个说的“不准”有什么含义




欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2