SubZero
Posts: 63
Joined: Mon Mar 14, 2011 10:29 am

Prevent File Uninstallation in new Version

Hi AI-Team,
we are currently using the Install option "install new version first and then uninstall old version" and can't change that because we need a rollback in case of an error.
We need to change the jre from java 7 to java 8 which is distributed with out software. We had a key component (Organization) in java 7, that is gone now in java 8 which let to the problem after update that the files under that component which are still there are getting deleted during uninstall of the old version after commit state. I created a new empty dummy file and added that as the new key component in order to avoid the deletion of all the files that were under that component.

Is there a more elegant way to avoid deletion of the files?
--->In a nutshell: Is it possible in the new version to prevent files to be deleted during uninstall of the old version?
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Prevent File Uninstallation in new Version

Hello,

The "Install new version first and then uninstall old version" option will work only if the file's components don't change from the old version to the new one (their names and GUIDs remain the same).

Your workaround is correct, however you could use a dummy registry key for your component instead of an empty dummy file.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”