[C] 纯文本查看 复制代码 @echo off
:start1
color 0E
Set titl=延时定时关机
title=%titl% By:嘎子
cls
mode con: cols=70 lines=22
echo ╭═══════════════════╮
echo ║ ║
echo ╭═══┤ %titl%实用小工具 ├═══╮
echo ║ ║ ║ ║
echo ║ ╰═══════════════════╯ ║
echo ║ ║
echo ║ 1:延时关机 ║
echo ║ ║
echo ║ 2:定时关机 ║
echo ║ ║
echo ║ 3:取消延时关机 ║
echo ║ ║
echo ║ 4: 取消定时关机 ║
echo ║ ║
echo ╟═══════════════════════════╢
echo ║ 脚本制作By:嘎子 QQ:102351263 ║
echo ╰───────────────────────────╯
:start
set /P num= 请选择(1/2/3/4):
if "%num%"=="1" goto 1
if "%num%"=="2" goto 2
if "%num%"=="3" goto 3
if "%num%"=="4" goto 4
echo 请正确选择
goto start
:1
cls
mode con: cols=50 lines=6
color 5f
set /p time=延时几分钟? (返回请按q):
if /I "%time%"=="q" goto start1
set /a time2=%time%*60
shutdown -c "要关机啦" /s /t %time2%
echo.
echo 进入延时关机倒计时...
ping /n 3 127.1 >nul
exit
:2
cls
mode con: cols=50 lines=6
color 5f
set /p shijian=请输入关机时间(24时制) (返回请按q):
if /I "%shijian%"=="q" goto start1
at %shijian% shutdown /s /t 30
goto 5
:3
cls
mode con: cols=50 lines=6
color 0a
shutdown -a
echo 已清除延时关机任务 @_*
ping /n 3 127.1 >nul
exit
:4
cls
mode con: cols=50 lines=6
color 0a
at /del /yes
echo 已清除定时关机任务 @_@
ping /n 3 127.1 >nul
exit
:5
cls
mode con: cols=50 lines=6
color 0a
echo 定时关机时间为 %shijian%
ping /n 3 127.1 >nul
exit |