Exit code in 1.0 used to return the value associated with enum values such as NT_STATUS_NO_MEMORY to the command line after a failed execution. The new 1.1 does not seem to do this. Is there a compile flag to (re) enable this behavior? My collegue makes the following observations:
"This bug appears to be a side effect of the new winexe 1.1. Winexe 1.0 used to report NT_STATUS_ error codes on failure. For example, if the VM has a broken domain trust relationship, winexe reported NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE. We used to catch this NT_STATUS_ code in our product and display an appropriate message / suggested resolution.
Winexe 1.1 however fails silently with no NT_STATUS_ error code. If I turn on debug output (“./winexe -d 1 ...”) with winexe 1.1, the NT_STATUS_ code is included in the output [as text]. However it also generates additional debugging information for successful commands which pollutes output redirected to our product.
Is there a way to re-compile winexe 1.1 to restore earlier behavior of reporting NT_STATUS_ codes on stdout for failure cases?"
Looking at the code in the winexe 1.0 git repo (called "old" in Sourforge's web interface) I don't see how it can return NT_STATUS codes. It appears to return only 0, 1 or 99. I can, however, see where debugging statements print the strings corresponding to NT_STATUS codes. Perhaps you are using an even older version of winexe?
Some questions for you.
Which NT_STATUS codes do you really need to receive?
Can you or your colleague contribute a patch to implement the desired behavior?