cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Cygnusx1
Level 8

Why is a CA needed to remove previously installed versioned files on Major Upgrades?

I have been pondering this scenario and it does not make sense. On Major Upgrades why is it necessary to include a CA to delete versioned files (before Cost Finalize) to get an older versioned file to install? It is a Major Upgrade why does it matter? Especially when the versioned files are isolated.
Scenario: a program has an older isolated versioned of java installed within INSTALLDIR\java. The programmers have found that they now need the previous version of java installed in the same location. None of the older versioned files get installed unless the folder structure is deleted prior to cost finalization.
Any thoughts? Please do not respond stating to change the file's version number within the File Table.
Labels (1)
0 Kudos
(3) Replies
Cary_R
Level 11

Hi there,

It is because the MSI Major Upgrade functionality doesn't communicate with the rest of the engine.

Even though the files are going to be removed during RemoveExistingProducts, CostFinalize/InstallValidate doesn't know that. Therefore, the need to delete the files.

I don't know if this is a consequence of the intentional design of major upgrades, or if it signifies Major Upgrades being more of an afterthought. But this is the behavior. I guess, if you required different behavior, the thinking might go that this is the fuction of the REINSTALLMODE property, which can be set by a custom action during a major upgrade to enable the behavior you're looking for.

Just my 2 cents, anyways.
0 Kudos
Reureu
Level 10

This issue has been discussed here (among other places):
As described, what you can do is schedule the RemoveExistingProducts action before the CostInitialize.
This will guarantee that the previous version is removed before Windows Installer checks which files must be reinstalled.

This is technically feasible, but ICE27 will fail when validating.
I hope that helps.
0 Kudos
Cygnusx1
Level 8

changing the sequence seems the easiest. Having CAs to delete files just to get around ICE errors is too time consuming.
Thank you
0 Kudos