This seems to me to be more of a wix-users question than a wix-devs question 
(and you will probably get more responses there than here), but to give you an 
answer:
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:15:46 +0100
From: [email protected]
To: [email protected]
Subject: [WiX-devs] 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. RegardsTrent

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs                           
          
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to