Some C compilers allow you to set the errorlevel with the exit statement as you terminate your program. e.g.: exit(0); for normal exit; exit(x); where x != 0 otherwise. Microsoft C let's you do this. Hoped that helped. /Paul