|The ERRORLEVEL stays the same until something changes it. AFAIK GOTO does not produce an errorlevel. GOTO /? says nothing about it, though you can't always trust the help to be complete. In some cases experimentation is the only way to know.|
Assuming x.exe does produce an errorlevel, I expect that you will get the results you want.