@echo off
set /p a=按Y开启定时关机,按N关闭
if /i %a%=="y" goto kaiqi
if /i %a%=="n" goto guanbi
exit/b 0
:kaiqi
sc config schedule start= auto
net start "task scheduler"
set /p b=请输入你要定时关机的时间,例10:30
if %b%=="" goto exit
at %b% shutdown -s -t 0
exit/b 0
:guanbi
sc config schedule start= disabled
exit/b 0
自己做了个定时关机的,不知道为什么GOTO就是跳转不到指定标签
我按"HAT大侠"教过我的查错方法在合适的位置加上了PAUSE发现GOTO跳转不过去.还请高人帮忙看看,还有我的"批处理"错在哪了,这个问题已经2次了有时又能跳过去,又时又不能,还请多忙帮讲解下.谢谢
set /p a=按Y开启定时关机,按N关闭
if /i %a%=="y" goto kaiqi
if /i %a%=="n" goto guanbi
exit/b 0
:kaiqi
sc config schedule start= auto
net start "task scheduler"
set /p b=请输入你要定时关机的时间,例10:30
if %b%=="" goto exit
at %b% shutdown -s -t 0
exit/b 0
:guanbi
sc config schedule start= disabled
exit/b 0
自己做了个定时关机的,不知道为什么GOTO就是跳转不到指定标签
我按"HAT大侠"教过我的查错方法在合适的位置加上了PAUSE发现GOTO跳转不过去.还请高人帮忙看看,还有我的"批处理"错在哪了,这个问题已经2次了有时又能跳过去,又时又不能,还请多忙帮讲解下.谢谢

