当前位置:DOS资源站资料中心批处理教程 → 简单的定时关机的批处理

简单的定时关机的批处理

减小字体 增大字体 作者:佚名  来源:本站整理  发布时间:2008-4-11 19:53:03

@echo off&title DOS资源站 www.cmdos.net

title 多功能定时关机 by 彬 QQ 43142691
color 5f
mode con: cols=75 lines=10
echo 是要定时重启系统( r )还是要定时关机( s )或者即刻重启( rn )或即刻关机( sn )
set /p d=输入你的选项:
if %d%==r goto %d% else
if %d%==s goto %d% else
if %d%==rn goto %d% else
if %d%==sn goto %d%
exit
:r
set /p run=请输入你要定时重启系统的时间(时间列:9:00)=
at %run% shutdown -r -t 0
exit
:s
set /p run=请输入你要定时关闭系统的时间(时间列:9:00)=
at %run% shutdown -s -t 0
exit
:rn
shutdown -r -t 0
exit
:sn
shutdown -s -t 0
exit