How to replace values in an . xml file using an .msi


Article ID: 180853


Updated On:


Symantec Products




 How can I change the values in an .xml file in my .wsi?

In the Windows Installer Editor tool in Wise Package Studio, you can detect .xml files. You can then edit your .xml files using the editor.

To set values to be replaced in an .xml file at runtime:

  1. On the Files or Web Files page in Installation Expert, add a valid .xml file.
  2. Double-click the .xml file and select the Dynamic Content tab. The contents of the .xml file appear in the list box.
  3. Mark Enable Dynamic Content. The Edit button becomes enabled for editable lines only after you mark Enable Dynamic Content.
  4. Select a line and click the Edit button.
  5. To edit an .xml attribute: 
    1. Select the attribute in the top list box. 
    2. In Dynamic Value, type a new value to replace the current value at runtime.
      You can enter bracketed Windows Installer property names as a value here. You must have added a mechanism elsewhere in the installation to populate the property. (Example: Use the Custom Property Dialog; see Adding the Custom Property Dialog. Or use properties defined in Runtime Properties.) 
    3. You can also select a property name from Property and click the Insert into Dynamic Value button.
  6. Click OK in the Attribute Editor dialog when finished.

During runtime, the attribute is replaced with the dynamic value you specified. Windows Installer properties are resolved to their value.

Note: Not all lines are editable; only lines that have name-value attributes are. (Example: <compilation defaultLanguage="c#" />.) The Attribute Editor dialog appears.