I thought I had this all worked out, but not quite.
I now have installers at customer sites, where I had setup install/uninstall custom actions. I failed to realize that I needed to add a (NOT UPGRADINGPRODUCTCODE) to the uninstall custom actions to prevent it from being run on upgrades.
So is it possible to remove a file before the previous product starts to uninstall on an upgrade?
Also I need to prevent %ALLUSERPROFILE%\Application Data\XXX from being removed on upgrades. What's the best course of action, move this directory aside and move it back after the previous product has been removed?