Answer the question
In order to leave comments, you need to log in
Why is the wrong %errorlevel% being returned?
I use this old time-mem utility to measure the execution time of some command from the command line.
It's just a c++ project, the main code is here .
I start to check, for the test I run timemem 7z some-err-str.
It is clear that an error is displayed, it shows code 7, this code is returned.
But in the batch file, if I print echo %errorlevel% right after this command, I get 0.
In general, it behaves the same as a similar ptime utility.
Why, I have no explanation. And most importantly, how can you fix it?
Answer the question
In order to leave comments, you need to log in
Yes, it was a stupid mistake. And I went to look in a completely different direction. info() always returned 0.
try replacing the batch file with cmd's file.... and read the usage syntax....
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question