计划关机工具
来源:互联网 发布:塔人网络接收奇迹世界 编辑:程序博客网 时间:2024/06/03 15:58
//使用shutdown命令制作的windows计划关机工具,可在指定时间后执行关机或重启。
//文件名:计划关机.bat
//代码:
:Begin
@cls@if "%~1"=="" color 8f&mode con cols=60 lines=15
@title 计划关机_Beswor
@echo==========欢迎使用计划关机工具 From Beswor============
@echo.
@set hh=0
@set mm=0
@set ss=0
@set type=0
@set /p type=0.取消 1.关机 2.重启 :
@if /i %type%==0 goto Cancle
@set str=关机(默认)
@if /i %type%==1 set str=关机
@if /i %type%==2 set str=重启
@if /i "%str%"=="关机(默认)" goto Begin
@echo.
:H
@set /p hh=【小时】:
@echo %hh%|findstr /be "[0-9]*" >nul &&set /a Res=1||set /a Res=0
@if %Res% EQU 1 (if %hh% GEQ 0 (goto M))
@echo !数字错误(大于等于0)
@goto H
:M
@set /p mm=【分钟】:
@echo %mm%|findstr /be "[0-9]*" >nul &&set /a Res=1||set /a Res=0
@if %Res% EQU 1 (if %mm% GEQ 0 (if %mm% LSS 60 (goto S)))
@echo !数字错误(大于等于0,小于60)
@goto M
:S
@set /p ss=【秒钟】:
@echo %ss%|findstr /be "[0-9]*" >nul &&set /a Res=1||set /a Res=0
@if %Res% EQU 1 (if %ss% GEQ 0 (if %ss% LSS 60 (goto Pre)))
@echo !数字错误(大于等于0,小于60)
@goto S
:Pre
@echo.
@echo ■%hh%小时%mm%分%ss%秒后%str%■
@set /p x=准备就绪,按回车键执行...
@set /a time=%hh%*3600+%mm%*60+%ss%
@if /i "%str%"=="关机" shutdown /s /t %time%
@if /i "%str%"=="重启" shutdown /r /t %time%
@ping 127.0.0.1 -n 2 >nul
@exit
:Cancle
@shutdown /a
@echo 已取消
@ping 127.0.0.1 -n 2 >nul
@exit
- 计划关机工具
- 计划任务定时关机
- 定时关机,取消关机工具
- 快速关机工具
- java关机工具
- win2003 计划任务关机 0x4f7
- 运行异常:已经计划系统关机
- win7使用计划任务定时关机
- 计算机关机操作工具实现
- 批处理制作定时关机工具
- Android 工具类计划
- Win7的定时关机功能(计划任务+shutdown.exe实现)
- 利用计划任务实现关机创建与启动删除用户
- leejianjun的博客 win7使用计划任务定时关机
- java 实现关机工具,托盘图标
- java关机工具类的实现
- 关机工具(Timer类+系统命令)
- 关机工具(Timer类+系统命令)
- Language Model与Naive Bayes Text Classification
- sql 年龄操作【转】
- 反射加载xaml页面
- Codeforces Round#179(Div 2)C Greg and Array
- yum和apt-get的区别
- 计划关机工具
- 再求围观
- linux c中局部变量/全局变量一瞥
- 【技术名词】Apache CXF
- unix下.snapshot文件夹
- iOS网络编程-iOS中Socket编程介绍
- Delphi 远程屏幕抓取(3)
- 关于开发需要了解的东西
- Java笔试面试题