As I understand it, within a transaction you can only manipulate database 
columns and rows that are marked "temporary" (because they don't exist in the 
MSI itself) [see http://msdn.microsoft.com/library/aa367457.aspx]. So, instead 
of removing rows, you will need to add them in the cases where you don't want 
to leave them behind. The easiest way to do that from my perspective is to 
create a table of your own with the same schema as the RemoveFile table, maybe 
adding a condition column, and then use a custom action to "copy" rows from 
your table to the RemoveFile table (based on the condition?) in the manner 
described in the dynamic combo box idea.Alternately, you can assign the files 
you may not want to remove to one or more components that you force to an 
action state of "unknown" (thereby preventing their "removal") when you 
uninstall via your custom action when you wish to suppress their removal (which 
will allow you to avoid parallel tables).Blair
> Date: Thu, 3 Nov 2011 21:34:40 +0100
> From: trent.stens...@gmail.com
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] Best strategy for optional file removal on uninstall
> 
> During my products lifetime there are a lot of files that will have been
> created in my applications bin folder, for example .config files. I
> currently just remove them at uninstall by having entries in the RemoveFile
> table.
> 
> I would on occasion like to be able to leave the files behind on uninstall
> and I first thought I'd stop using the RemoveFile table and instead delete
> the files from a Custom Action (which I could have a condition on).
> 
> After Googeling for a while, I found this thread about dynamically
> populating a ComboBox. Can I use a similar trick on uninstall (i.e.
> deleting one or more entries in the RemoveFile table).
> 
> Not 100% sure how the syntax would be, so though I'd ask first in case this
> isn't possible.
> 
> Regards
> Trent
> PS
> Sorry to those of you that are members of the WiX-devs, didn't notice that
> I'd signed up to the wrong group before I posted it there.
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
                                          
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to