everest支持静默运行出报表,详见其运行参数。附上一段代码,写得有点繁琐,要的话凑合看吧,不好意思没注解。win8没测过。里面的查询失败001之类的我是做另外用途的,可不管它Func EVEREST()
$reppatch = @TempDir&"\eve.ini"
If IsAdmin() Then
RunWait($exepath&"EVEREST\everest.exe /R "&$reppatch&" /INI /CUSTOM "&$exepath&"EVEREST\user.rpf /SILENT /LANGEN")
If @error <> 0 Then
$cpuT = "查询失败001"
Else
$jieguo = IniRead( @TempDir&"\eve.ini", "Sensor", "Temperatures|CPU", "xx" )
If $jieguo = "xx" Then
$jieguo = IniRead( @TempDir&"\eve.ini", "Sensor", "Temperatures|CPU #1 / Core #1", "NN" )
If $jieguo = "NN" Then
$cpuT = "查询失败002"
Else
$cpuT = StringLeft($jieguo,2)&"℃"
EndIf
Else
$cpuT = StringLeft($jieguo,2)&"℃"
EndIf
EndIf
Else
RunasWait("有本地管理员权限的用户名","网域","密码",0,$exepath&"EVEREST\everest.exe /R "&$reppatch&" /INI /CUSTOM "&$exepath&"EVEREST\user.rpf /SILENT /LANGEN")
If @error <> 0 Then
$cpuT = "查询失败003"
Else
$jieguo = IniRead( @TempDir&"\eve.ini", "Sensor", "Temperatures|CPU", "xx" )
If $jieguo = "xx" Then
$jieguo = IniRead( @TempDir&"\eve.ini", "Sensor", "Temperatures|CPU #1 / Core #1", "NN" )
If $jieguo = "NN" Then
$cpuT = "查询失败004"
Else
$cpuT = StringLeft($jieguo,2)&"℃"
EndIf
Else
$cpuT = StringLeft($jieguo,2)&"℃"
EndIf
EndIf
EndIf
EndFunc
|