如何让我的选择命令去我想去的地方?

问题描述 投票:0回答:0

我做到了

@echo off
title Admin RKG
color A

:eof
setlocal enabledelayedexpansion
set "string=AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890"
set "result="
for /L %%i in (1,1,20) do call :add
goto :key

:add
set /a x=%random% %% 62
set result=%result%!string:~%x%,1!
goto :eof

:key
cls
title key
color 2
echo your key is...
echo.
echo [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
[]
echo.
echo                         %result%
echo.
echo [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
[]
pause
choice /d n /t 10 /c YN /m "are you sure you saved your key? "
IF %ERRORLEVEL%==1 goto :bye
IF %ERRORLEVEL%==2 goto :key

:bye
echo Thank you for using Admin KG
echo you will now be kicked out in ...
timout /t 10 /nobreak
exit

我预计它会转到:再见

batch-file
© www.soinside.com 2019 - 2024. All rights reserved.