Run Script action fails with Error 0

  • 7022418
  • 01-Dec-2017
  • 01-Dec-2017

Environment

ZENworks Configuration Management 2017

Situation

ERROR:

[Run Script Action] [] [An error occurred while executing the run script configured program. Error is: The operation completed successfully.Exit code is : 0] 
[ERROR] [ZenworksWindowsService] [56] [] [BundleManager] [ActionHandlers.RunScriptHandler.ProgramErrorWithExplaination] [An error occurred while executing the program. Error is: The operation completed successfully.

Resolution

Either:

  1. Change the script to use redirection of stderr.  Example:
    command.exe  2>null

    or

  2. To bypass all errors, set Advance options "Success Return Codes" to *

Cause

The script enforcer checks both return code against the Success Return Codes setting in the action, but also checks for output to standard error port.  If some command in the script sends success string to stderr instead of stdout, this error can happen.