Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- "C:\Program Files (x86)\cmdow-1.4.8\bin\Release\cmdow.exe" @ /hid
- call "C:\Program Files (x86)\OpenHardwareMonitor\boot.cmd"
- :loop
- cd %temp%
- set PROBLEM=
- wmic /namespace:\\root\OpenHardwareMonitor path Sensor where "SensorType='Fan' and Value<100" get Name,Identifier,Value 2>&1 | find "No Instance(s) Available."
- if .%ERRORLEVEL%.==.1. set PROBLEM=Fan
- wmic /namespace:\\root\OpenHardwareMonitor path Sensor where "SensorType='Temperature' and Value>60 and Name='System'" get Name,Identifier,Value 2>&1 | find "No Instance(s) Available."
- if .%ERRORLEVEL%.==.1. set PROBLEM=System
- wmic /namespace:\\root\OpenHardwareMonitor path Sensor where "SensorType='Temperature' and Value>50 and Name='Temperature'" get Name,Identifier,Value 2>&1 | find "No Instance(s) Available."
- if .%ERRORLEVEL%.==.1. set PROBLEM=Hdd
- wmic /namespace:\\root\OpenHardwareMonitor path Sensor where "SensorType='Temperature' and Value>85 and Name like 'CPU%'" get Name,Identifier,Value 2>&1 | find "No Instance(s) Available."
- if .%ERRORLEVEL%.==.1. set PROBLEM=CPU
- if .%PROBLEM%.==.. goto done
- if exist %PROBLEM%.dead goto done
- echo %computername% %PROBLEM% high temp at %date% %time% >%temp%\mon.txt
- echo. >>%temp%\mon.txt
- wmic /namespace:\\root\OpenHardwareMonitor path Sensor where "(SensorType='Temperature' or SensorType='Fan') and Value!=124.5" get Name,Identifier,Value 2>&1 |sort /r >>%temp%\mon.txt
- "C:\Program Files (x86)\blat3212\full\blat.exe" %temp%\mon.txt -to email@domain.ru -f hyperv@home.local -s "%PROBLEM%" -server 192.168.1.2
- ren %temp%\mon.txt %PROBLEM%.dead
- :done
- timeout 60
- goto loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement