|You could make the script invoke itself with "cmd /k". That way you will just be taken a prompt if something happens.|
With this method I suggest always starting a new window because the only way to close it is "EXIT" (with no switches), this will also kill any initial prompts.
if not "%~1"=="__reinvoked" (
start cmd /k "%~f0" __reinvoked %*
if ==l kdf
Kinda seems useless in batch files though since batch files crash when a error pops up.
What is called an "errorlevel" in batch is just a return code. It can be quite useful, just not in the case of an internal command that causes a crash.