Hi,
When running from the command line, just use the ERRORLEVEL: variable and exit with the value of the return code of the previous statment;
Therefore if you have a batch file that looks like this;
@echo off
echo Here is a test
logparser "select 'Twit' from *.*" -i:fs -q
exit %ERRORLEVEL%
You will get an exit code of 0.
If you have a batch file that looks like this
echo Here is a bad test
logparser "This is an error"
exit %ERRORLEVEL%
You will get an exit code of 1615.
Just note that if there is no data you will also get valid error codes - you may want to refer to the documentation for further info.
Hope this helps, good luck.
Cheers, Dave