Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

Re: How to upgrade file with type "XML File (Windows Installer)

Hi Daniel,

With your help during this conversation as well as with the sample you gave us under this ticket:
viewtopic.php?f=2&t=21968&p=97206#p97206
we successfully managed to achive our original goal which was the following:
1. Customer has web.config file with some content
2. The nodes modified by the customer should be preserved during product upgrades
3. When the product is upgraded and a newer web.config is coming, the entire content (including new nodes) are taken over from new web.config, but the modified nodes will keep their values.

This was the original specification and it works all fine. However we gave this solution to our customers and they don´t like a few things:
1. Currently we have to know in advance which nodes should be kept. Those nodes will be found in the old web.config by XML Locator and the values will be saved into custom properties. When new web.config is coming, the values will be updated based on those custom properties. This approach always requires a list of "important nodes" from the customers, based on the list coming from them, we have to keep on upgrading our .aip project from time to time.
2. So basically they are complaining, because they affraid something can be easily left out from that list. Leaving out a single node can lead to serious problems (security issues) on their side.
3. They would like to get a different solution: the whole content of old web.config should be kept, including everything. All the lines and everything. That would reduce the risk of leaving out something from the list, since there won´t be a list of "important nodes" anymore. If the new web.config comes with some new sections/nodes in his XML, then the new sections/nodes should be simply taken over from new to old. Kind of keeping the old config file and appending some content to it from the new config file.

Please let me know if something is unclear. We need to satisfy the demand of our customers, so we need to figure out a solution. How could we achive this with Advanced Installer? Thanks in advance!

Best regards,
Zsolt
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to upgrade file with type "XML File (Windows Installer)

Hello Zsolt,

I think you should be able to achieve this just by unchecking the "If the element is found:" option for all of your XML element settings.

Also, the XML file should not be removed on uninstall.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

Re: How to upgrade file with type "XML File (Windows Installer)

Hi Daniel,

Please find my answer under viewtopic.php?f=2&t=28199&p=97264#p97264

Sorry for switching between threads, but I found a sample from you under that thread which was quite useful. I had to extend your samples a little bit, because they don´t work under all circumstances.

Best regards,
Zsolt
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to upgrade file with type "XML File (Windows Installer)

Hello Zsolt,

You can check my reply on the other forum thread.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”