@setlocal @echo off cd /d "%~dp0" call "%~dp0hglamservice.exe" %* SET RES=%ERRORLEVEL% if NOT 0 == %RES% ( echo KAIF11112-E An error occurred while processing the command. ^(%RES%^) ) @endlocal