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

RemoveExistingProducts rollback

When upgrading to a new version, I have the RemoveExistingProducts action set to happen after the new upgrade is installed. But if I cancel the upgrade during this action, it performs rollback for removing the old version which means it restores it. This rollback doesn't affect the process outside of RemoveExistingProducts, so the new version which has already finished installing is unaffected. But now the old version is also present on the machine, both are present in Remove/Add Programs. So now I have two versions of the product.

Is there a simple way to deal with this? It seems like a pretty big flaw of the Windows Installer/InstallShield.
Labels (1)
0 Kudos
(4) Replies
Ajay_Ladsaria
Level 7

There are three different placements for the RemoveExistingProducts action. It seems that you selected the placement where this action is sequenced after InstallFinalize action. In this situation a problem during the removal of the old product will not cause the new one to uninstall. Please see the Microsoft reference stating this:
RemoveExistingProducts Action
http://msdn.microsoft.com/en-us/library/aa371197(VS.85).aspx

Note, that you can instead sequence the action right before InstallFinalize to get full rollback coverage. In InstallShield this can be done in the Upgrades view - Major Upgrade Settings. Select the second radio button (Install setup then remove unneeded files) and the checkbox (Rollback all changes if removal of old files failed).

Common Tab
http://helpnet.flexerasoftware.com/robo/projects/installshield16helplib/UpgradeWISetupCommon.htm
0 Kudos
anom217
Level 8

I did what you said and selected the 2nd option, so the RemoveExistingProducts action was moved right before InstallFinalize. But now when I run the initial installation of the product, when it reaches that point in the sequence an error dialog displays saying:
"Error 2613. RemoveExistingProducts action sequenced incorrectly."

Since InstallShield placed the custom action there this doesn't seem right? Any explanation as to why I am getting this error?
0 Kudos
anom217
Level 8

I got it working. I had a couple of deferred custom actions between InstallExecute and InstallFinalize. I moved them immediately before InstallExecute (although I would have preferred to have them occur afterwards), so my sequence went InstallExecute -> RemoveExistingProducts -> InstallFinalize and it installed correctly. Is there a reason you can't have deferred custom actions occurring between InstallExecute and InstallFinalize?
0 Kudos
anom217
Level 8

Okay, now I'm running into a new problem. When I do rollback during the RemoveExistingProducts action, it removes all the new changes. The environment variables, registry, are reverted back to the old settings. However, the folder structure is entirely deleted! I can't find a custom action that is doing this, so it seems the Installer is doing it automatically somehow. Is there a way during rollback to preserve the old version rather than erase everything?
0 Kudos