Obtenha o último código de saída CMD
echo Exit Code is %errorlevel%
Funny Fox
echo Exit Code is %errorlevel%