DOS-shutdown-program/自动关机小程序.bat at main · 1091515459/DOS-shutdown-program · GitHub
下不了直接复制粘贴到文本文件,后缀名txt改成bat,解释一下数字冒号后面是剩余关机时间,0是取消关机(如果已经设置关机了再次启动程序输入0然后回车就能取消定时关机),不明白的你敲个0到5试一下就知道什么意思了
@echo *** 1: 10M
@echo *** 2: 30M
@echo *** 3: 1H
@echo *** 4: 2H
@echo *** 5: 4H
@echo *** 0:cancel
set /p w=
if "%w%"=="0" goto guanji0
if "%w%"=="1" goto guanji1
if "%w%"=="2" goto guanji2
if "%w%"=="3" goto guanji3
if "%w%"=="4" goto guanji4
if "%w%"=="5" goto guanji5
goto setdown
:guanji0
shutdown -a
goto qc
:guanji1
shutdown -s -t 600
goto qc
:guanji2
shutdown -s -t 1800
goto qc
:guanji3
shutdown -s -t 3600
goto qc
:guanji4
shutdown -s -t 7200
goto qc
:guanji5
shutdown -s -t 14400
goto qc