用exit /b 1 解决
1.bat- @echo off
- cd /d "%~dp0"
- call 2.bat
- echo 1.bat
- pause
复制代码 2.bat- @echo off
- call 3.bat||exit /b 1
- echo 2.bat
复制代码 3.bat- @echo off
- echo 3.bat
- choice /c YN /m "exit 3.bat and 2.bat ?"
- if %errorlevel% equ 1 (
- exit /b 1
- ) else (
- exit /b 0
- )
复制代码
|