Hello Frode,
I have set the component for the config file to Never Overwrite to prevent overwriting of user modified config files
This setting doesn't prevent the user to modify the file. The User Guide states:
"The component is not installed or reinstalled, if a key path file or a key path registry entry for the component already exists. This affects
only future installers which try to overwrite the component key path, it doesn't affect already installed resources."
This is related only when Installing components. Updating an XML file is not restricted.
The approach you are looking for is this :
- Add the XML file in Advanced Installer in "Windows Installer" format. Open it with the XML Editor. The file will display all the elements of your imported file.
- Add your new element.
- Update your older element's attribute.
- You can delete the elements that you don't want to be modified.
How it will work:
The elements found different will be updated or removed based on your settings, the ones missing will be added.
There is no need to do this:
* remove both of this elements from the initial (the installed) config file
* set create element if it doesn't already exist for the connectionStrings->add, attribute name = ConnectionString set as key, attribute connectionString = valuex=[propertyX] etc.
* set create element if it doesn't already exist for the appSettings->add, attributes as required
* don't set never overwrite on the component for the config file
If you have any other questions, please don't hesitate to ask us.
Best Regards,
Octavian.
_______________________________________________________________________________________________________________________________________________
Octavian Vasilovici
Advanced Installer Team
http://www.advancedinstaller.com/