What I would consider doing is the following:
 
1. Make the component installing the config file an "unmanaged" component (a 
component with an explicitly blank guid). It can then only be "reinstalled" 
with a major upgrade (minor upgrades and patches will ignore that component and 
thus will not ever replace the file). It will also not be removed automatically.
 
2. Create a custom action that adds the config file to the RemoveFile table 
during uninstalls when the user has requested the removal of the file. The 
associated component cannot be the component that installs the config file in 
the first place (since that component will never be "uninstalled"), so a 
different component will have to be used in the table. This is in the spirit of 
"semi-custom actions" that Bob Arnson blogged about.
 
Test all scenarios. You may or may not need to invoke your custom action in 
order to replace the config file due to the "non-versioned" file upgrade rules, 
so you may need two different InstallMode values depending on the scenario.
 
> Date: Mon, 9 Sep 2013 00:03:12 -0700
> From: lukas.pa...@web.de
> To: wix-users@lists.sourceforge.net
> Subject: Re: [WiX-users] Deleting Config File based on CheckBox
> 
> Hello Blair Murri-3,
> 
> Thanks for your reply.
> 
> This config is an default config and need to be edited from the user to set
> some paths. Otherwise it won´t work. So yes it will be changed manually but
> not from any program.
> 
> When the user update this program he can choose if he want to replace his
> config with the default on or leave  his own config. The config is an
> optional component in the installer. I am using the MondoUI with some custom
> dialogs.
> 
> Kind regards
> Lukas
> 
> 
> 
> --
> View this message in context: 
> http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Deleting-Config-File-based-on-CheckBox-tp7588783p7588836.html
> Sent from the wix-users mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
                                          
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to