I have following wix file that is supposed to call the Custom Action during the installation. The custom action will create some files required for program. As Wix will only remove only those files that were installed by installer, files created by Custom action will be leftover. So I am resorting to RemoveFile provided by Wix.
Wix File. <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product Id="*" Name="WixCustomAction" Language="1033" Version="1.0.0.0" Manufacturer="Sarvagya" UpgradeCode="1d77ebdc-2ba2-4b34-b013-7c8a8adcef5b"> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> <MediaTemplate EmbedCab="yes"/> <Feature Id="ProductFeature" Title="WixCustomAction" Level="1"> <ComponentGroupRef Id="ProductComponents" /> <!--<ComponentGroupRef Id="RemoveLeftOvers" />--> </Feature> </Product> <Fragment> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="WindowsVolume"> <Directory Id="INSTALLFOLDER" Name="LearningWix" /> </Directory> </Directory> </Fragment> <Fragment> <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> <Component Id="SomeDLL"> <File Source="C:\boost_1_55_0_dyn\stage\lib\boost_atomic-vc100-mt-1_55.dll" /> </Component> <Component Id="RemovingFiles"> <RemoveFile Id="ConfigRemove" Name="lpa.config" On="uninstall"/> <RemoveFile Id="LogsRemove" Name="*.log" On="uninstall"/> <RemoveFile Id="ProductCodeRemove" Name="productcode.txt" On="uninstall"/> </Component> </ComponentGroup> <Binary Id="SetupCA" SourceFile="..\LearnCustomAction\bin\Release\LearnCustomAction.CA.dll"/> <CustomAction Id="FileWrite" Execute="immediate" BinaryKey="SetupCA" DllEntry="WriteFileToDisk" /> <InstallExecuteSequence> <Custom Action="FileWrite" Before="InstallFinalize"></Custom> </InstallExecuteSequence> </Fragment> The Custom Action will create files lpa.config and productcode.txt . Apps will create output.log, output.1.log, ... . But during compilation, I get following error The Component/@Guid attribute's value '*' is not valid for this component because it does not meet the criteria for having an automatically generated guid. Components using a Directory as a KeyPath or containing ODBCDataSource child elements cannot use an automatically generated guid. Make sure your component doesn't have a Directory as the KeyPath and move any ODBCDataSource child elements to components with explicit component guids. How am I supposed to correctly use RemoveFile for removing the leftovers? One can see the same question @ http://stackoverflow.com/questions/28470189/wix-removefile-for-removing-leftovers -- *sarvagya* ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users