CustomActionData attribute [deployment in Visual Studio]

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.