How can I capture the output of a script?

asked 12 Sep '11, 07:41

Jake's gravatar image

Jake ♦♦
181533174
accept rate: 98%


You can create or set the value of an installer variable from the output of a script or program using a <setInstallerVariableFromScriptOutput>. You will have to include a section like the one below inside an action list section of your XML installer project file.

       <setInstallerVariableFromScriptOutput>
           <name>myhostname</name>
           <exec>hostname</exec>
           <execArgs>-f</execArgs>
       </setInstallerVariableFromScriptOutput>

That code will create an installer environment variable called myhostname that will store the output thrown by the program hostname. You can later refer to the content of that variable using {myhostname}.

link

answered 12 Sep '11, 07:43

Jake's gravatar image

Jake ♦♦
181533174
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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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

Tags:

×4
×2
×2
×1

Asked: 12 Sep '11, 07:41

Seen: 166 times

Last updated: 12 Sep '11, 07:43

powered by BitNami OSQA