cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hugener
Level 3

Repair cause incorrect values to be written to XML file changes

Hi everyone,

We have a installer that does some XML file changes. One of the changes can be specified by the command line or entered into a text box in the GUI during installation. The value is a key from which the actual XML changes are derived by a custom action.

However, if we run a repair on the installation the XML changes are overwritten with our default values and thus the repair actually breaks the installation. I would have expected the entered values (CommandLine or GUI) to be persisted somehow, so that the repair feature would know what to do.

I don't have much experience with InstallShield and was wondering if anyone can guide me in a direction? Or how would one implement this?

Labels (1)
0 Kudos
(2) Replies
banna_k
Revenera
Revenera

Hi @hugener ,

 

    Here you can block the XML changes during the repair, and allow only during the installation. All the xml changes are done through the custom actions.

So, right click on the custom actions root node, and select Show All Custom Actions. Then you can find InstallShield's XML actions and change their conditions to prevent them from running. Condition to this XML custom actions can be set from the sequences tree, by selecting each xml custom actions and conditions grid will be listed in the right hand side.

examples for custom action conditions:

https://helpnet.flexerasoftware.com/installshield24helplib/helplibrary/IHelpBuildCondition.htm#buildingconditionalstatements_2699476707_1029547

To execute a custom action only if the product has not been installed, check the value of the Installed property with this condition.

Not Installed

 

0 Kudos

Hi @banna_k, Thanks for the reply. I'll be giving it a try. However, I do think it is a bit of a workaround because it would effectively disable xml transformation for all xml files, meaning if there would have been a problem with one of them they will not get repaired. I guess to implement it in a clean way the variables would have to be persisted somehow. Do you have any suggestions for how to achieve that?
0 Kudos