原文:
===========================================
@echo off
title 选择关机
color 3f
set /p chioce= 请输入命令\ 重启【r】\关机【s】\退出【q】
if %chioce%==r goto reboot
if %chioce%==s goto shutdown
if %chioce%==q goto end
:reboot
shutdown -r /t 10
goto rechioce
:shutdown
shutdown -s /t 10
goto rechioce
:rechioce
color f3
title 要取消关机吗
set chioce=
set /p chioce=取消关机【c】
if %chioce%==c goto cancle
goto end
:cancle
cls
shutdown -a
goto end
:end
exit
=========================================
在执行第一个选择命令是,敲入"e"等其他字母(不是q r s ),也会跳出关机提示,不是应该报错吗?
===========================================
@echo off
title 选择关机
color 3f
set /p chioce= 请输入命令\ 重启【r】\关机【s】\退出【q】
if %chioce%==r goto reboot
if %chioce%==s goto shutdown
if %chioce%==q goto end
:reboot
shutdown -r /t 10
goto rechioce
:shutdown
shutdown -s /t 10
goto rechioce
:rechioce
color f3
title 要取消关机吗
set chioce=
set /p chioce=取消关机【c】
if %chioce%==c goto cancle
goto end
:cancle
cls
shutdown -a
goto end
:end
exit
=========================================
在执行第一个选择命令是,敲入"e"等其他字母(不是q r s ),也会跳出关机提示,不是应该报错吗?
