For example, I don't want to overwrite the config file and some other files,What should I do using WiX?
views:
479answers:
1Assuming your files are just text/xml the default behaviour of MSI would be to notice that they are unversioned and have been changed since last install and therefor they will be skipped on upgrade. See MSI File Replacement logic.
Now if your config file has changed between releases (add/removed some options) you'll need to do something to upgrade the file while saving the previously edited values. That gets a little trickier.
Take a look at: StackOverflow - Manage configuration files with wix
If this is user settings for an application I would tend to agree with Rob Mensching (the main WiX guy) in the post above, that it would be better to have the app handle its own config and the updates to it.
However this doesn't work well if it is the config file for a service or something that should not be writing to its own config file. You are usually left with writing custom actions to manually handle this scenario. fun times. ;)