@echo off set t=c:\temp.fil :loop c:\menu\dougmenu.exe %1 %2 %3 if errorlevel==2 %t% if errorlevel==1 goto quit call %t% goto loop :quit