Parent .bat
@echo off
SETLOCAL
set errorlevel=2
start /wait child.bat
echo %errorlevel%
Child .bat
set errorlevel=1
exit %errorlevel%
Output:
2
Expected Output:
1
The answer provided here does not work for me, also I don't understand why you would use /b and leave the cmd open.
برچسب:
نویسنده: استخدام کار