Adding an Attribute to an Element

InstallShield 2015

Project: This information applies to the following project types:

Basic MSI
DIM
InstallScript
InstallScript MSI
Merge Module
MSI Database
Transform

You can add attributes to an element in your XML file and then specify whether the attribute should be created at run time, the attribute should be removed at run time, or the attribute value should be appended to the existing value at run time. You can also schedule whether the task should occur during installation, uninstallation, or both.

If an attribute that you add already exists in the XML file on the target machine but the attribute has a different value than the one that you specified in the XML File Changes view, the installation updates the value at run time.

To add an attribute to an XML element:

1. In the View List under System Configuration, click XML File Changes.
2. In the XML Files explorer, click the XML file to which you want to add an attribute.
3. Click the General tab.
4. Click the Add button.

InstallShield adds a new row—with default values for the Attribute, Value, Operation, and Scheduling columns—to the attribute table. Change any of the settings as needed. To learn more about each of the columns, see General Tab for an XML Element.

Tip: If you configure your installation so that the XML file remains on the target system when its component is uninstalled, you may want to create installation/uninstallation attribute pairs in the attribute table.

For example, to add a key attribute during installation and remove that same key attribute during uninstallation, add two rows with the key attribute to the attribute table; schedule one row for installation, and the other for uninstallation.

See Also