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
You can only use the RemoveFolder
element to remove empty folders, so that won't help much.
If you have a CustomAction that creates files in your application directory, I suggest you don't create RemoveFile
elements for those. Oftentimes, you're going to create subfolders with disposable data in your application directory and you'd have to create removal elements for every file that is added to the directory. The lazy way to go about this is to make use of the RemoveFolderEx Element. As described on that page, you have to use the Remember property pattern to make this work.
Here is an example how to implement these two techniques:
REMOVAL_CMD
REMOVAL_CMD