We use an XML configuration file with default settings in our application. The user can make changes to the settings in the UI but those are stored in another XML configuration file external to anything the installer is concerned about.
During installation, either through the installer UI or through an MST for unattended installations, values for settings are gathered and then written to the default settings XML file using util:XmlFile elements.
The issue we're having is during a repair, those changes are lost and the default settings are all set to empty values. We are not currently willing to replace how we store settings for the application, so please don't suggest alternatives for storing them like INI files, the registry, etc.
How can we preserve the changes during a repair? At a minimum, I'd like the repair to just not affect the XML file if it already exists but still put it back if it's missing (even if it was with the empty values). Optimally though, the repair should do what it's supposed to and put everything back to how it was immediately after initial installation.