0

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.

Community
  • 1
  • 1
hitman126
  • 699
  • 1
  • 12
  • 43

1 Answers1

2

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.

Community
  • 1
  • 1
Rick Bowerman
  • 1,866
  • 12
  • 12
  • @hitman126 You could have comments that show how to use various elements in your config file—they needn't be touched. – Tom Blodget May 17 '14 at 23:37