I have a WiX package that should always deliver files, but should only uninstall the files when a condition is met. The condition is that common files should not be uninstalled if another version of the product is installed (we are not supporting true upgrades, our upgrade is installing the files to a new folder that has the version of the package and installing new versions of the common files). I realize this can be achieved by using the same GUIDs across components or using merge modules, but I also have to account for the fact that I have legacy packages from InstallShield that could be installed. Unfortunately, the designers of those packages had no idea of what was going on with installers, and they installed files to a temp directory, then copied them to a new location, so Windows Installer has no knowledge that the files are installed. I have tried a couple different things. Approach #1: <Component Id="myfile.dll" Guid="{YOUR-GUID-HERE}" Transitive="yes" > <Condition> NOT Installed OR ((REMOVE ~= "ALL") AND (OTHER_VERSIONS_PRESENT ~= "FALSE"))</Condition> <File Id="myfile.dll" KeyPath="yes" Source="$(var.PATH_TO_BIN_FILES)myfile.dll" /> </Component> Approach #2: <Component Id="myfile.dll" Guid="{YOUR_GUID_HERE}" Permanent="yes" > <File Id="myfile.dll" KeyPath="yes" Source="$(var.PATH_TO_BIN_FILES)myfile.dll" /> </Component> <Component Id="myfile.dll_remove" Guid="{YOUR_GUID_HERE}" Transitive="yes" > <RemoveFile Id="myfile.dll_remove" Name="myfile.dll" On="uninstall" /> <Condition>OTHER_VERSIONS_PRESENT ~= "FALSE"></Condition> </Component> Additional Info Here is my property that I am using with the custom actions and the condition: <Property Id="OTHER_VERSIONS_PRESENT" Value="FALSE" /> Here is my scheduling of the custom action that sets the OTHER_VERSIONS_PRESENT property. I have verified that it is correctly set to true or false, based on whether another version of the product is present. <Custom Action="FindOtherVersionsOfProduct" After="CostFinalize" /> I have also tried the above approaches with CDATA wrapped around the condition, but this also failed. Additionally, I tried changing the install sequence of when I set the property. I've tried different conditions. But nothing has worked. Thank you in advance for any support you can give me.
Christoph Griesshammer GE Healthcare IT Software Engineer Email: christoph.griessham...@ge.com<mailto:christoph.griessham...@ge.com> http://www.gehealthcare.com<http://www.gehealthcare.com/> GE Imagination at Work ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users