Brett, For #2, if the file is being installed by a Component then the file will be removed on uninstall like any other file.
For #1, use the &feature-condition syntax shown at http://msdn.microsoft.com/en-us/library/aa368012(VS.85).aspx. Note that for this to work the CA must be scheduled after CostFinalize. If you need to run this CA before then you will need to determine that by getting the list of features to be installed from inside your CA ad take appropriate action. If you can, use the XmlConfig element. Since you associate this element with a Component, you can simply place the component doing the writing in the appropriate feature. This method is more reliable and maintainable then relying on a CA. Hope this helps. -farooq -----Original Message----- From: brett king [mailto:brettonk...@gmail.com] Sent: Wednesday, October 07, 2009 8:50 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Conditional Custom Actions I have a custom action that takes user information and writes a configuration file. My two questions are: 1. How can I put a condition on the custom action to only write if when a specific feature is selected for installation? 2. Do I have to create another custom action to remove this file or can I use the standard features? A snippet for your reference is: <Binary Id="InstallDllCA" SourceFile="InstallDLL2/Release/InstallDllCA.dll" /> <CustomAction Id="WriteConfigurationFile" BinaryKey="InstallDllCA" DllEntry="WriteConfigurationFile" /> <InstallExecuteSequence> <RemoveExistingProducts After="InstallInitialize" /> <Custom Action="WriteConfigurationFile" Before="InstallInitialize" >NOT Installed </Custom> </InstallExecuteSequence> Thanks very much. Brett ---------------------------------------------------------------------------- -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users