We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

CustomActionData Property

Specifies additional data that can be evaluated by a custom action during installation. Custom actions are run at the end of an installation and cannot access information about the installation; the CustomActionData property allows you to store information about the installation that can be read by the custom action.

For example, if your deployment project included a file search with a Property property of FILESEARCH1, you could pass the value returned by the file search by setting the CustomActionData property to /MyFile=[FILESEARCH1]. In your custom action, you could query the MyFile property to retrieve the value.


The format for the CustomActionData property depends on the type of the custom action.

  • For custom actions that are installation components (ProjectInstaller classes), the CustomActionData property takes a format of /name=value. Multiple values must be separated by a single space: /name1=value1 /name2=value2. If the value has a space in it, it must be surrounded by quotes: /name="a value".

    Windows Installer properties can be passed using the bracketed syntax: /name=[PROPERTYNAME]. For Windows Installer properties such as [TARGETDIR] that return a directory, in addition to the brackets you must include quotes and a trailing backslash: /name="[TARGETDIR]\".

    Note   In order for a custom action to be treated as an installation component, the InstallerClass property must be set to true.
  • For all other custom actions (.exe, .dll, or script), there are no format requirements. You can pass any string in the CustomActionData property, since you must parse it yourself in your custom action.

See Also

Properties for the Custom Actions Editor | Walkthrough: Passing Data to a Custom Action | Creating Installation Components - High-Level Process | InstallerClass Property