Setting the computer shutdown timer using the shutdown system console utility.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
@echo off :ret echo Select action: echo Set new shutdown timer - (1) echo Cancel previously set timer - (2) echo. set /p var = "Enter the variant number:" if "%var%"=="1" (set /p t="Shutdown computer in (minutes): " & set /a t=t*60 ) else ( if "%var%"=="2" (echo. & shutdown /a & exit) else (cls & goto ret)) shutdown -s -f -t %t% |