hitman126
hitman126

Reputation: 951

How to disable and enable comments in XML configuration files in WiX

I have created a WiX MSI installer for my application and would like to be able to manipulate its web.config file during installation as follows:

  1. Disable or comment out an existing element in the web.config file

  2. Enable an existing element that is currently disabled or commented out, in the web.config file

    Any tips or advice on how I can achieve this would be greatly appreciated, as my rigorous search on this online has so far yielded no positive results.

Thank you.

Upvotes: 0

Views: 535

Answers (1)

Rick Bowerman
Rick Bowerman

Reputation: 1884

If you can avoid needing to comment out and rather just set a value you can use the WiXUtilExtension, here's an example.

Other wise for commenting out you are probably looking at using a transform, I think the WiXUtilExtension approach would be more obvious to the maintenance developer in the future though.

Upvotes: 2

Related Questions