Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(GH-249) Fix "operation completed successfully" on stderr
It seems that many applications out there can return this error and still exit with a zero exit code, when this is logged within the PowerShell service runner, it should redirect that back to the info stream and not count it as a fail point. If PowerShell does exit with a non-zero status, then we should count the whole install as a failure no matter what messages were logged. In this way the exit code 0 and the message "The operation completed successfully" are not considered a failure. References: https://rcmtech.wordpress.com/2012/03/06/vbscript-and-reg_binary-registry-values/ http://en.community.dell.com/techcenter/powergui/f/4833/t/19570669 >I've found the problem. The main problem is in reg.exe utility. >Depending on the version reg.exe utility works differently. v5.1.x.x (that I have on my XPSP3) works correctly, but v5.2.x.x does not work as it is expected to work. >"reg import" command: >- when v5.1: returns "Operation completed successfully" to standard OUTPUT stream >- when v5.2: returns "Operation completed successfully" to standard ERROR stream >Moreover, it is probably a problem with PowerShell also :( >PowerShell treats these streams differently and process ERROR stream messages as errors. Which is correct imho.
- Loading branch information