我想做一个 知道关机的 批处理 但是 选择后 就没了 下文
不知道是怎么回事 哪里出错了
各位帮忙看看
@echo off
color 0A
echo.
echo.
echo.
echo ========================
echo 你要定时关机吗?
echo ========================
echo.
echo.
echo.
pause
cls
echo.
echo.
echo.
echo 1.你想多久后关机?(以秒为单位)
echo.
echo.
echo.
echo 2.你想定在那个时间关机?(24小时制)
echo.
echo.
echo.
:cho
set /p choice= 请选择(1或2):
if /i "%choice%"="1" goto g
if /i "%choice%"="2" goto start
echo 你的选择有误,请重新选择
goto cho
:g
set /p time1= 你想多少秒后关机:
shutdown -s -t "time1"
exit
:start
set /p time2= 请输入要关机的时间:
at %time2% shutdown -s -t 0
exit
不知道是怎么回事 哪里出错了
各位帮忙看看
@echo off
color 0A
echo.
echo.
echo.
echo ========================
echo 你要定时关机吗?
echo ========================
echo.
echo.
echo.
pause
cls
echo.
echo.
echo.
echo 1.你想多久后关机?(以秒为单位)
echo.
echo.
echo.
echo 2.你想定在那个时间关机?(24小时制)
echo.
echo.
echo.
:cho
set /p choice= 请选择(1或2):
if /i "%choice%"="1" goto g
if /i "%choice%"="2" goto start
echo 你的选择有误,请重新选择
goto cho
:g
set /p time1= 你想多少秒后关机:
shutdown -s -t "time1"
exit
:start
set /p time2= 请输入要关机的时间:
at %time2% shutdown -s -t 0
exit
