The answer is indicated in the comments above, but for the future reference, there are two things that need to be checked first when the files are not deleted:
Make sure you don’t have Component / @ Guid = ". In particular, setting to an empty line (Guid =" ") tells the Windows installer to ignore all the materials embedded in this component. Note: WiX v3.6 + you can leave the attribute completely Guid of the Component element, and this is normal (a stable GUID will be created).
Make sure you do not have the / @ Permanent = "yes" component. Obviously, this means that the Windows installer does not delete the data.
source
share