Specify additional data that can be calculated by custom operations during installation. Custom operations run at the end of installation and do not have access to installation information. The CustomActionData attribute allows you to store installation information that can be read by custom operations.
For example, if a deployment project contains a file search with the "Property" attribute FILESEARCH1, set the "CustomActionData" attribute"/MyFile = [FILESEARCH1]", You can pass the value returned by the file search. In a custom operation, you can query the MyFile attribute to retrieve the value.
Remarks
The format of the CustomActionData attribute depends on the type of the custom operation.
For custom operations that are used as installation components (ProjectInstallerClass), the "CustomActionData" attribute adopts the/name = value form. Each name must be unique and has only one value. Multiple values must be separated by a space:/Name1 = value1/name2 = value2. If the value itself has a space, quotation marks must be placed on both sides of the value:/Name = "a value".
Use the brackets Syntax:/Name = [propertyname]You can pass the Windows Installer attribute. For Windows Installer properties that return directories like "[TARGETDIR]", in addition to brackets, quotation marks and backslashes must be added:/Name = "[targetdir]"".
Note: |
To make custom operations considered as installation components, you must set the "installerclass" attribute to "true ". |
There is no format requirement for all other custom operations (.exe,. dll or script. You can pass any string in the CustomActionData attribute, because you must analyze it yourself in the Custom operation.
MSDN: http://msdn.microsoft.com/zh-cn/library/2w2fhwzz (VS.80). aspx