Install New Version first and then uninstall old version. - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

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

Install New Version first and then uninstall old version.

Hi advanced installer team,
in order to achieve upgrades AND rollbacks we use the option "Install New Version first and then uninstall old version" and we still have some problems organizing our files.
Example:
If I add the java runtime as a feature to our installation project the advanced installer creates a component for every file (and it generates a GUID for every component). Lets say after a couple of weeks a new version of the java runtime appears and we would like to change our installation so that the next upgrade removes the old version and installs the new one ->how do we achieve that? Removing the feature from our aip file and adding the new files as a feature will cause the advanced installer to create a new component and a GUID for every file --> this will cause the advanced installer to also remove new files during the uninstallation of the old version in upgrade phase that have the same name and a different GUID so that the package will be inconsistent.

How do I avoid that? Adding all files to one component and editing the GUID before every update would be theoretically possible but is not feasable for thousands of files. How do I achieve the above java runtime change without getting an inconsistent system?

thanks in advance
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Install New Version first and then uninstall old version

Hi,
Lets say after a couple of weeks a new version of the java runtime appears and we would like to change our installation so that the next upgrade removes the old version and installs the new one ->how do we achieve that?
For this it's better to use "Uninstall old version first and then install new version" option. The other upgrade option is recommended for smaller updates (only a couple of files). When changing a big chunk of your installation, it's better if the old version is removed completely before installing the new one.

An alternative would be to use a JRE prerequisite instead of a bundle.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
SubZero
Posts: 63
Joined: Mon Mar 14, 2011 10:29 am

Re: Install New Version first and then uninstall old version

"Uninstall old version first" is no option for us because we need the rollback to the old version if the upgrade does not work.

The given problem could be solved if you change the "synchronized folders" logic a little I think. At the moment the "synchronized folders" feature is only working with "uninstall old version first" and not with "install new version first" because everytime something changes new GUIDs are created for every item.

The logic for "synchronized folders" should be the following:
Every time the folders are synchronized the advanced installer should check first if a given file already belongs to a component and that way already has a GUID. If it is the case it should not give the file/component a new GUID in order to avoid uninstallation during the uninstall of the upgrade phase. This way the feature would work for both options "uninstall old version first" and "install new version first" and would solve my problem.

What do you think about this change? Please tell me if you could add that to the advanced installer features....I think it would be very very helpful for everyone using the option "install new version first"
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Install New Version first and then uninstall old version

Hello,

Actually this is already supported.

To accomplish this, you mustn't change anything in the .AIP. When a new version of your JRE is available, simply replace it with the old one in the synchronized location from the hard drive. The location and name should be the same as the old one. After this, if you open and build the project, the GUID will remain the same, but the included JRE will be the upgraded one.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”