When building a new version of my application, it's possible that files that were needed in a previous version are no longer needed. I would like these to be cleaned up during an upgrade. My ideas so far:
- I considered using the
InstallDelete, but this would require the current build to know what files the previous build contained. The build process is automated, and I'd prefer that the build didn't have to check in anything. (It makes tagging and the like rather messy.) - I also considered running an uninstall, but this would mean that the upgrade could not be fully rolled back (since the application would have been uninstalled).
Is there a way to detect files that were present in the old install but not the new one during the install and to have Inno delete them in a way that could be rolled back (or that happens only if the install was successful)?