Adding an Execute shell command event action

Use the Execute shell command action to run a shell command after a specified event occurs. The Execute shell command event action allows you to run a shell command like that performed using the operating system Run command from the Start menu.

About this task

For example, you can run a shell command to open Notepad or an email program.

To add an Execute shell command event action to an object:

Procedure

  1. Select the object in the editor window and double-click the event that you want to trigger the jump from the Events view.
    The [objectname] Behavior window opens.
  2. Click the Add New Action icon.
    The Add New Action window opens.
  3. Select Execute shell command in the actions tree.
    Note: To quickly find the required event action, type the name of the action in the filter text field.
  4. Click Next.
    The Execute shell command action parameters page opens.
  5. Type the command in the Command box or click Browse to browse and select a file that contains the commands.
    Note: You can use expressions to specify commands. For example, type ="%SystemRoot%\notepad.exe " + Var1 to open a file, the path to which is stored in the Var1 parameter, in Notepad.
  6. Click Finish. The Execute shell command action is added. The Add New Action window closes.
  7. From the [objectname] Behavior window, click the Apply button to apply all actions that have been added for the event.
  8. Click OK to close the [objectname] Behavior window.