Are you aware that you can run a Custom Action only during the uninstall in a Basic MSI project?
This is actually very easy. Open your Basic MSI project, and go to Behavior and Logic section, Custom Actions and Sequences view. Select the Custom Action you want to run only during the uninstall. Go to the property sheet and set the condition for the sequence the Custom Action resides in. If the Custom Action is in the Install UI Sequence, then set the Install UI Condition to REMOVE="ALL". Or if the Custom Action is in the Install Exec Sequence, then set the Install Exec Condition to REMOVE="ALL".
That's all there is to it.