Bro,
I have developed a simple script ( batch file *.bat)) that will check if encoding is still being done ( every 60+ secs ) and if the process is over, it will shutdown the PC. I tried to keep the code very very simple so that others can improve it.
For now , i have tested this on Windows 7 SP1 – 64 bits and it works well.
Here is the code, copy and paste it into notepad – i named it AutoPowerOff-AdobeMediaEnCoder.bat
…..code below ………
@echo off
echo.
date /t
time /t
echo.
:StartMonitoring
echo.
echo.
echo.
color 0f
echo Start monitoring Adobe Media Encoding Process
echo Check every 60 secs via KeepMonitoring
ping 127.0.0.1 -n 60 > nul
Goto Check
:KeepMonitoring
echo.
echo.
echo.
color 0f
echo Continue Monitoring Adobe Media Encoding Process – every 60s
ping 127.0.0.1 -n 60 > nul
Goto Check
:Check
echo.
echo.
echo.
color 0e
echo Checking If Encoding Process Over ?
echo.
echo.
color 0a
tasklist | find /i “PProHeadless.exe”
IF ERRORLEVEL 1 GOTO AutoPowerOFF
IF ERRORLEVEL 0 echo. && echo Encoding Still In Progress && GOTO KeepMonitoring
:AutoPowerOFF
echo.
echo.
echo.
color 0c
echo Process PProHeadless.exe does not exist anymore
echo Assume Encoding DONE
echo PC Poweroff Initiated
echo.
echo.
echo ShutDown PC After 60 sec
shutdown /s /t 60
:END
…. end of code …..
Regards,
Marco.
p.s – posted this in some other thread…
Its good to consolidate. Will monitor that thread.