Adding a Custom Action to a Project

Custom Actions are any commands that can be executed on the target server during deployment, based on dependencies.

Adding a Custom Action requires specifying its Custom Action Name (only used to identify the command), and Custom Action properties .

Field Description
Target (file) tab

A full program path (wrapped in quotation marks), followed by a command with any parameters and environmental variables (if applicable).

"c:\windows\system32\net.exe" start %SERVICE_NAME%

You can use a predefined folder from a drop-down list, provide an absolute path to a file, or enter a command (in the Custom path field), e.g., net start FlexNetMachineIntegratorConnector This field is mandatory.

Start in (folder) tab Specifies the location of the original item or some related files. Sometimes, programs need to use files from other locations. You might need to specify the path to the location where these files are located so that the program can find them. This field is optional.
Custom environment variables grid Allows to define custom environment variables that will be used while executing the command. Selecting an Extend check box for specific name/value pair will cause existing values (if present) to be supplemented (not replaced) with the specified one.
Detect error when application returns result different than 0 (success) check box If selected, it results in deployment failure for the Package containing Custom Action entity type when the command is not successfully executed. In this case, the failure information will be available in Status details field of the Package Action Properties Window for the specific Package.