Uninstall [Code]: ability to run uninstall code from previous installs
Right now only the latest [code] section is ran at uninstall time - I suggest adding the ability to run older uninstall-time code going from the latest to the oldest, with each iteration having a way to decide if older version of [code] should run as well.
I think you missed the point. 'The code from installer that was run last', can be version 1 of the application overwriting a version 2. Version 1 cant know about 2 so cant take decisions either.
I dont know how many incompatible changes happen, there's no effort to keep compiled code compatible. ANSI and Unicode compiled code is also incompatible as said making this request impossible atm.
Jernej Simončič commented
By latest, I meant the code from installer that was run last. It would be up to [code] itself to decide then whether to run previous iterations in the uninstall log (leave the burden of this decision to the script programmer - while it's likely impossible to come up with a general solution that would work for everybody, it shouldn't be that hard for somebody who needs this functionality to come up with his own set of rules).
As for compiled [Code] compatibility between different versions of Inno Setup/IFPS, how often did incompatible changes happen so far?
The same applies to Unicode vs ANSI installs. What if the 'older' install is Unicode and the 'newer' isnt, or vice versa.
Similarly, what if the 'newer' install is actually an older version of the program. What [Code] is then the 'old' code? How does the chain looks after a couple installs on top of each other over various upgrades, downgrades and updates.
I think this shows this request is not nearly as simple as one might think, and a stronger case should be made why this is worth investigating when one can already simply always include a complete [Code] to address most cases.
This assumes that compiled [Code] remains compatible between versions which is not necessarily the case at the moment.