WiX overwrites config files during setup. How can I avoid this?

forki23 picture forki23 · Mar 14, 2010 · Viewed 16.4k times · Source

I'm using WiX to create a windows installer. Unfortunately my installer overwrites a config file on every update. What I really want is, that the installer only creates the file if it is not found.

Thanks and regards, forki

Answer

Dave Andersen picture Dave Andersen · Aug 31, 2010

The Component @NeverOverwrite="yes" attribute might be the solution to this problem.

From the WiX help documentation:

If this attribute is set to 'yes', the installer does not install or reinstall the component if a key path file or a key path registry entry for the component already exists. The application does register itself as a client of the component. Use this flag only for components that are being registered by the Registry table. Do not use this flag for components registered by the AppId, Class, Extension, ProgId, MIME, and Verb tables.

Component Element Documentation