Pass errorlevel from a child batch to parent

خرید بک لینک

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.

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 281 تاريخ: سه شنبه 15 تير 1395 ساعت: 19:48

صفحه بندی