bat完美关机命令

时间:2022-08-22 21:50:19
@echo off
title OLIVER-COMPUTER
mode con cols= lines=
color 0d
shutdown /a >nul >nul
ver > %temp%\ver.temp
find /i " 5.2" %temp%\ver.temp > nul && set shutdowntime=&& goto start
set shutdowntime=
:start
cls
set choice=
echo       \\\ATA/// %date%
echo       \\ - - // %time:~0,8%
echo         ( @ @ )
echo ┏━━━oOOo━━(_)━━oOOo━━━━┓
echo ╀ ╀
echo A◎ .今天你关了吗?    ◎
echo A◎ .赶快快快重启啦! ◎
echo A◎ .来个定时怎么样? ◎
rem echo A◎ .计划关机!(尽请期待) ◎
echo ╁ Oooo ╁
echo ┗━━━━━━━━oooO━━( )━━┛
echo ( ) ) /
echo \ ( (_/
echo \_)
set /p choice=...说吧,想做什么操作,就在这儿输入:
If "%choice%" equ "" goto gj
If "%choice%" equ "" goto cq
If "%choice%" equ "" goto ds
If "%choice%" equ "" goto jh
If "%choice%" equ "q" goto :eof
goto start
:gj
echo.
echo .....确定立刻关机吗???直接按下Enter
set /p choice=.......想反悔的话,也行,输入N:
if /i "%choice%" equ "n" ( goto start ) else (shutdown /s /t )
echo.
goto end
:cq
echo.
echo .....确定立刻重启吗???直接按下Enter
set /p choice=.......想反悔的话,也行,输入N:
if /i "%choice%" equ "n" ( goto start ) else (shutdown /r /t )
echo.
goto end
:ds
set shijian=
set /p shijian=.....恁就写上关机时间吧(秒为单位):
if "%shijian%" equ "" goto start
set tempzhi=%shijian%
:yanzheng
set zhi=%tempzhi:~,%
if "%zhi%" equ "" goto quzhi
if "%zhi%" equ "" goto quzhi
if "%zhi%" equ "" goto quzhi
if "%zhi%" equ "" goto quzhi
if "%zhi%" equ "" goto quzhi
if "%zhi%" equ "" goto quzhi
if "%zhi%" equ "" goto quzhi
if "%zhi%" equ "" goto quzhi
if "%zhi%" equ "" goto quzhi
if "%zhi%" equ "" goto quzhi
echo.
echo ЖЖЖ输入内容含有非法字符串,请从新输入ЖЖЖ
pause > nul
goto start
:quzhi
set tempzhi=%tempzhi:~%
if "%tempzhi%" == "" goto jixu
goto yanzheng
:jixu
if %shijian% leq %shutdowntime% (
shutdown /s /t %shijian% /c 我屮,得狠了吧,说关就关你!!!
) else (
echo.
echo ЖЖЖ你输入的关机时间超出电脑范围ЖЖЖ
echo 请输入小于%shutdowntime%的数值
pause>nul
goto start
)
echo.
echo ¤¤¤电脑将在%shijian%秒后关机,抓紧了¤¤¤
echo.
echo .....确定关机时间了吗???直接按下Enter
set /p choice=.......想反悔的话,也行,输入N:
if /i "%choice%" equ "n" ( goto qx ) else ( goto end )
:jh
echo.
echo.
echo 计划关机暂未推出,请敬请关注!
echo ... ...
pause > nul
goto start
:qx
cls
shutdown /a > nul >nul
set choice=
echo       %time%
echo.
echo .额知到错了,再也不敢关机了,绕了我吧?
echo.
echo .哥只是失误,最近眼睛不太好使了,时间瞧错了
echo.
echo .我原来是想重启来,冤这电脑不按套路出牌
echo.
echo .太慢了,我要立马关机里,不玩了...
echo.
echo.
echo 又反悔了吧?就你这臭脾气,深度鄙视你!!!
set /p choice=瞧见了没?上面有的后悔药让你选,自己看着办:
echo.
if "%choice%" equ "" goto qx
if "%choice%" equ "" goto start
if "%choice%" equ "" goto ds
if "%choice%" equ "" goto cq
if "%choice%" equ "" goto gj
if "%choice%" equ "q" goto :eof
:end
echo.
echo Good Bye!!!
echo %date%
pause>nul

这是一个比较个性化的关机脚本。

把上述的代码粘贴复制到新建的“关机.bat”脚本中,然后双击执行即可。