How to set the error level - exit code - return value for a batch file


The following is an example Windows batch file that returns the exit code of 123:

@echo off
echo "Example batch file returning 123"
@exit 123