### 8.6 Commands to execute

Any commands entered allow you to execute specific operating system level commands before or after a package is installed on a target machine.

Before and After Commands are not supported in Patches built with V14SP1 or later.

 To open the Commands to execute dialog, select the Commands to execute icon from the Package Maintenance Window toolbar.

Separate tabs are created for entry of commands to execute before package installation and after package installation.

Select the Commands to run before Install tab to enter the commands you wish to execute before the install.

Select the Commands to run after Install tab to enter the commands you wish to execute after the install.

Enter/Amend the commands, from the list of available commands, as required in the relevant tab.

Press the OK button when the command entry is completed.  The commands are updated when the package is saved.

 Clear all commands from the currently open tab. Import commands into the currently opened tab from the tab delimited file nominated in the associated text box.

Important - You are responsible for ensuring that the package installs correctly, and that the commands executed before and after the LANSA installation processing execute correctly and in the sequence you require.

The Conditions and Commands available for use are provided in these lists:

Tips when using commands to execute
• Directory and path type substitution variables that contain imbedded blanks when resolved will cause the execution of the LANSA Import to fail. To correct this issue the value should be enclosed in double quotes. For example, "%dirp%execute".
• If you include the command MD (make directory) all intermediary directories must exist. For example, if you intend to create a directory c:\Program Files\MYAPP\other objects when currently only c:\Program Files can be assumed to exist you will need to include the commands:

MD "c:\Program Files\MYAPP"

MD "c:\Program Files\MYAPP\other objects"