test.txt内容如下:
:test "run a command" [x]
[.]dir
[.]dir /b /a-d
[ ok ][? cancel ]
:
执行的批处理内容如下:
@echo off
:menu
cls
call w.bat menu @test.txt:test
if %wrb% equ 1 goto dir
if %wrb% equ 2 goto dir1
:dir
dir
pause
goto menu
:dir1
dir /b /a-d
pause
goto menu
为什么选择 cancel不能退出呢?
:test "run a command" [x]
[.]dir
[.]dir /b /a-d
[ ok ][? cancel ]
:
执行的批处理内容如下:
@echo off
:menu
cls
call w.bat menu @test.txt:test
if %wrb% equ 1 goto dir
if %wrb% equ 2 goto dir1
:dir
dir
pause
goto menu
:dir1
dir /b /a-d
pause
goto menu
为什么选择 cancel不能退出呢?
