If you want the custom action to run before files are removed, sequence it before RemoveFiles action --Independent WiX Expert. Creator of- https://JetBA.net - Native and WPF WiX BootstrapperApplication Frameworks