Yes, that code made no sense, but it was in there - so I will assume someone put it in there for some reason that isn't obvious. I suspect there was a case when this exception was thrown, but the exit value did come back 0. Maybe the exit value was never set at the time this exception was thrown, so its default 0 remained in place? I'm just paranoid of removing code like this without knowing the effects. Again, someone felt the need to put it in here - so I am assuming there was a reason for it. We need to confirm that exit values will never be 0 when that exception is caught. If this exception is caught, I don't think we should ever consider the execution a success (0), even if it tries to tell us it is (I agree that it wouldn't make sense for this exception to be thrown and exit code == 0 - but again, that is so obvious that it makes me wonder why this special code is in here. I suspect it is in here because there was a case where it was seen that that value was 0). I think ExecuteException here on line 38 should look at exit value and assure it is never 0 - if it is, set it to that UNKNOWN constant. This would retain the same behavior of the deleted code.