cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
SeanSteele
Level 4

XML file Changes

Hi Can anyone tell me if it is possible to disable my XML file changes when the install is an upgrade?

I only want the XML file changes to happen if the install is a first time install

Thanks
Labels (1)
0 Kudos
(6) Replies
Vijay__K
Level 7

Hi,
You can condition the component which is associated with xml change.
Have the condition 'Not Installed' as the condition so it runs first time only.
0 Kudos
SeanSteele
Level 4

Hi Thanks for your reply, I will try it out.

Thanks again
0 Kudos
SeanSteele
Level 4

Hi set the component condition to 'Not Installed' didn't seem to make any difference sorry.
0 Kudos
Reureu
Level 10

You could also add a condition to the ISXml... custom actions, but it can be a bit tricky, as you need to understand exactly what each of them is actually doing.

Another alternative would consist in isolating your component in a separate feature, and configure it so that the feature itself does not get reinstalled in your upgrade scenario.
Indeed, the XML file changes are only applied to components when the corresponding feature gets (re)installed.
But depending on your feature configuration, you might not be able to isolate the component.

Alternatively, you can leave the XML file changes as they are, but add a system search to your project, which looks for the information in the XML file you are configuring at installation.

In an upgrade scenario:
[LIST=1]
  • The information will be read from the XML file thanks to the system search.
  • The XML File changes will apply the changes to this XML file again.

    As a result, your XML file will remain unchanged after an upgrade.
  • 0 Kudos
    SeanSteele
    Level 4

    Thanks Reureu I'll try out your suggestions and let you know.

    Thanks
    0 Kudos
    SeanSteele
    Level 4

    Hi again, I moved my XML config to it's own seperate feature and set the condition of the Feature to not reinstall in the upgrade scenario as suggested.
    This seems to have worked!

    Thanks for the help and suugestions 🙂
    0 Kudos