I've got a serious problem with an upgrade, and it came only due to my lack of knowledge and now I don't know how to fix it.
Sometimes after uninstalling my product I had some files in main direcotry, something like TRASH. So I decided to write a custom action to remove all files. And I gave it at the end of execute sequence with condition REMOVE = "ALL".
Everythings worked fine.... until now, when I'm working with newer version of my product. During the upgrade wihle "RemoveExistingProducts" nested msi runs properly and of course it deletes my files , which I've just upgraded

How couldn't I think about it before ?

Is it any solution to upgrade this product in such clever way, that nested application won't run this my bloody DeleteTrashFiles custom action ?
I know that, I can switch off RemoveExistingProducts from "new" installation, but probably it isn't good solution. In such circumstances product is installed OK, but I;ve got 2 versions installed (2 programs in Add/Remove in Control Panel).
Any idea how to work around my big mistake I made in earlier version ?
I would be very happy for any suggestion.
best regards
Piotr