怎么样使用cmd电脑关机命令
发布时间:2017-04-07 02:18
在我平常的生活当中,我们怎么有去利用电脑的系统命令cmd去使我们的电脑关机了,其实设置的方法很简单?下面小编教大家cmd电脑关机命令的解决方法,希望能帮助到大家!
cmd电脑关机命令的解决方法
右键打开右键菜单,新建一个文本文档

把文本文档的.txt后缀改成.cmd或者.bat。比如把“新建文本文档.txt”改成“test.bat”

在弹出的对话框中点击确定。

右键点击test.bat,在弹出的菜单中点击编辑

然后输入如下命令:
@echo off:beginecho 1:设置关机之间(倒计时)echo 2:取消定时关机。echo 3:退出set /p ans=请输入你的选择:if %ans%==1 goto 1if %ans%==2 goto 2if %ans%==3 goto 3:1set /p time=请输入时间shutdown -s -t %time%goto begin:2shutdown -agoto begin:3
Ctrl+S保存

双击test.bat,可以看到如下界面

首先输入1,按enter键,然后输入倒计时间(PS:这里的倒计时是已秒数来记的),比如输入3600,按enter键即可。

设置成功后,右下角任务栏会弹出,电脑会在60分钟内关闭的提醒。

要取消也很简单,输入数字2,按enter键即可,此时右下角任务栏会弹出,注销被取消的提醒。

怎么样使用cmd电脑关机命令的评论条评论