another comment:
* it looks a bit ackward to add the global variable lastCmdSucceeded... as it's just errorlevel == 0 * couldn't this be doable by just testing the value of errorlevel from previous command in chaining? * maybe it'll require first to ensure that all commands properly set errorlevel