| ||
@echo off
cls
color 0A
@echo off
echo ===================================
echo ===本工具用于快速关机设置===
echo ===================================
echo 请选择需要进行的操作:
echo 0 立即关机
echo 1 立即重启
echo 2 定时关机
echo 3 计时关机
echo 4 取消定时关机
echo 5 取消计时关机
echo 6 退出
set /p operate="选择后回车(0/1/2/3/4/5/6):"
echo ===================================
if %operate%==0 goto 0
if %operate%==1 goto 1
if %operate%==2 goto 2
if %operate%==3 goto 3
if %operate%==4 goto 4
if %operate%==5 goto 5
if %operate%==6 goto 6
:0
shutdown /s /t 0
goto 6
:1
shutdown /r /t 0
goto 6
:2
set /p moment="请输入关机时间(如02:30) :"
schtasks /create /tn "shutdownsystem" /tr "shutdown /s" /sc once /st %moment%
pause
goto 6
:3
set /p moment="请输入倒计时时间(单位秒,如3600):"
shutdown /s /t %moment%
echo 计时关机计划已添加
pause
goto 6
:4
schtasks /delete /tn "shutdownsystem"
pause
goto 6
:5
shutdown -a
echo 计时关机计划已撤销
pause
goto 6
:6
exit