@echo off
cd c:\Program Files\
valami1.exe
:itt
if errorlevel 1 goto itt
if errorlevel 0 goto good

:good
valami2.exe /AUTOS
exit