mardi 17 novembre 2015

What is an elegant way to simulate batch script failure?

I am working on this complicated (for me...) automation and one part is a batch script Started (not Called) from another one.

Now, it's all work-in-progress and I'd like to be able to replace the Started batch script with a simple instruction that would do such that the Start-ing script, after having started the child script, has:
%ERRORLEVEL% EQU 1 (And then I could work on the error-handling aspects and test stuff)

But also something nice that doesn't put the system in an unnatural state (and I might script things according to that bad state and wonder why things don't work when I assemble it all).
So, "Format C -q" doesn't work! ;)

Thanks

Aucun commentaire:

Enregistrer un commentaire