You could also schedule the RemoveExistingProducts action later in the sequence. You lose several advantages of major upgrades and pretty much absolutely have to follow component rules closely as if it were a minor/small upgrade but it is an alternative to the preserve & restore pattern.
Alternatively, you could control configuration files in the application itself instead of using WiX as an omniscient application manager. In this way, you could just pass app.exe /majorupgrade or app.exe /uninstall or app.exe /install and have the application "make it happen" (tm). This is my own personal preferred way to do it because you can use a configuration management class within the class so config file upgrade management requires no maintenance. YMMV as always :) -----Original Message----- From: Marc Beaudry [mailto:mbeau...@matrox.com] Sent: Thursday, April 17, 2014 11:19 AM To: 'General discussion about the WiX toolset.' Subject: [WiX-users] Preserving Files on Upgrades - CA or no CA Hello Everyone, I found tons of answers to this problem, but I have a hard time believing that CA's are the best way to resolve this. I am far from being a WIX expert so I would appreciate a second opinion on this one. I have an application that generates configuration files during execution, I want to preserve these files on upgrades and completely remove them on a full uninstall. Using and RemoveFile and RemoveFolder I am able to completely remove all the application generated files, if I add an execution condition to my component something like <Condition>REMOVE="ALL" AND NOT UPGRADINGPRODUCTCODE</Condition> The files never get uninstalled. Are properly sequenced CA's backing up and restore files the correct way of preserving files, or is there a "more" WIX way of doing this???? Thanks for your expert opinion, Marc ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies. ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users