momarf
Posts: 5
Joined: Wed Feb 04, 2015 9:54 am

Xml Edit conditional operations

When adding XML operation for web through Edit XML File dialog, it will be really helpful to add/update/remove based on a condition.

Recently i had to add some nodes in xml configuration depending on value of a property. There was not easy way of doing it and I end up writing a custom action to manipulate XML file.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Xml Edit conditional operations

Hello,

Indeed, currently we don't have predefined support to condition the install/update/remove operation of the XML elements. I've added this improvement on our TODO list and hopefully it will be available in a future version of Advanced Installer. Thank you for your suggestion. We'll update this thread as soon as the improvement will be out.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Xml Edit conditional operations

Hello,

As an addendum to my previous reply, for now as a workaround you can also try to proceed like this:
1. add your XMl file (e.g. "test.xml") in "Files and Folders" page containing only the elements which will be always installed
2. under the current parent folder of your XML file create a new subfolder
3. enable the "Install folder content into the parent folder" option for the created subfolder
4. in the subfolder create a new "test.xml" file which will contain only the elements you need to add/update based on condition
5. assign the XML file from the subfolder to a component which will be installed conditionally
6. rebuild and test the installation

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
momarf
Posts: 5
Joined: Wed Feb 04, 2015 9:54 am

Re: Xml Edit conditional operations

Thanks. Workaround works for me
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Xml Edit conditional operations

You're welcome.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Xml Edit conditional operations

Hello,

This improvement has been added in version 12.2 of Advanced Installer released on June 10th, 2015.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Xml Edit conditional operations

Hello,

An XML element installation/update could be conditioned with the help of the "Condition" field from "Element Settings" tab of the related XML element.

If you have any questions or doubts just let us know.

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

Return to “Feature Requests”