I want to run a defined action more than once after some execution. So I am thinking to put that code in a function and call that function whenever I need.

How to create functions/methods?

asked 05 Mar '13, 07:25

sjain7389's gravatar image

accept rate: 0%

Functions can be added in <functionDefinitionList> for project and component. They define an action list and optional list of arguments to show. For example:

<project> ... <functionDefinitionList> <!-- Define the action --> <actionDefinition> <name>unattendedRunProgamWithProgress</name> <actionList> <showProgressDialog> <title>Please wait ...</title> <actionList> <runProgram progressText="Installing ${program}"> <program>${program}</program> <programArguments>--mode unattended ${programArguments}</programArguments> </runProgram> </actionList> </showProgressDialog> </actionList> <parameterList> <stringParameter name="program" value="" default=""/> <stringParameter name="programArguments" value="" default=""/> </parameterList> </actionDefinition> </functionDefinitionList> <initializationActionList> <!-- Use the new action --> <unattendedRunProgamWithProgress> <program>${yourProgram}</program> <programArguments>--prefix "${installdir}"</programArguments> </unattendedRunProgamWithProgress> </initializationActionList> ... </project>

It is documented in more details in Creating Custom Actions section of installBuilder user guide.


answered 05 Mar '13, 11:33

wojciechka's gravatar image

wojciechka ♦♦
accept rate: 26%

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](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



Asked: 05 Mar '13, 07:25

Seen: 1,166 times

Last updated: 05 Mar '13, 11:33