WiX Installer removes config file values on repair -


i have created installer copies config.ini , asks user values inserted ini file. works fine during fresh install , major/minor upgrades.

<component id="configini" guid="guid-goes-here" diskid="1">     <file id="configinifile"              name="config.ini"              source="../../artefacts/etc/template-config.ini"              keypath="yes"/>     <inifile id="valueone"              action="addline"              directory="etc"              section="sectionone"              name="config.ini"              key="valueone"              value="[valueoneproperty]" />     <inifile id="valuetwo"              action="addline"              directory="etc"              section="sectiontwo"              name="config.ini"              key="valuetwo"              value="[valuetwoproperty]" /> </component> 

however, if user tries install same version of product installed, installer enters repair mode. i'm not sure how repair mode works, in case of config.ini file, seems deleting 1 populated values, copying again, , because it's repair it's not got user values populate config.ini file with, file blank.

is there way of getting installer ignore file on repair, or original user values?

the basic problem property values not being preserved. there no magic automatically saves values of properties between install , repair (or adding new features etc). problem not file being replaced because windows not replace files have been modified user data.

in wix, use "remember property" pattern save values of properties restored in these maintenance cases.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -