Capturing stdout, stderr and exit codes

asked 13 Sep '11, 07:55

Jake's gravatar image

Jake ♦♦
accept rate: 98%

BitRock InstallBuilder provides a built-in feature that makes it possible to retrieve the standard output, standard error and exit code for every application run by the installer (via a <runProgram> or <setInstallerVariableFromScriptOutput> actions). This way, after you execute any of those two actions, the following installer variables will get populated:


You can make use of them wherever you want in the xml file (just note that if you run another program, the variables will be overwritten with the new values). For instance:

 <programArguments>argument1 argument2</programArguments>

 <text>Program output: ${program_stdout}
Program error: ${program_stderr}
Program exit code: ${program_exit_code}

If stdout or stderr are redirected this installer variable will be created but will be empty.


answered 13 Sep '11, 07:58

Jake's gravatar image

Jake ♦♦
accept rate: 98%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 13 Sep '11, 07:55

Seen: 1,442 times

Last updated: 13 Sep '11, 07:58