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!

PetBel
Posts: 3
Joined: Fri Nov 07, 2008 11:37 am

Upgrade older versions

Hi

First time installation and uninstall of my first project with Advanced Installer works as expected.

But now I have some problems with upgrading:
Is there a way to realize the following behavior for upgrading with the professional version?

If an older version, all before 1.70.0000 (my actual version in the setup) is installed, I simply want to display a Message box with a text like “An older version of this product is already installed. Please uninstall it before installing this version.” And the setup should end after that.

If an older version, all from 1.70.0000 and up is installed, I want to differentiate between two variants:
1) Mainversion and subversion is the same (1.70.2065 -> 1.70.4076)
Fields Username, Organization and Serial Number in UserRegistrationDlg should be prefilled with values used when older version was installed.
2) Mainversion and/or Subversion is different (1.70.2065 -> 1.71.7362)
Only fields Username and Organization should be prefilled with values used when older version was installed. Serial Number should be empty, because its different to the one used with older version.

Thanks
Peter
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Upgrade older versions

Hello Peter,
If an older version, all before 1.70.0000 (my actual version in the setup) is installed, I simply want to display a Message box with a text like “An older version of this product is already installed. Please uninstall it before installing this version.” And the setup should end after that.
You can achieve this by creating a search that stores the version.

You can then use an "ErrorMessage" custom action and condition it based on the search result.

An example of such search would be "Product Version (identified by UpgradeCode)".

For instance, if your search stores the ProductVersion in the RESULT_PROPERTY property, you can have a condition as it follows:

Code: Select all

RESULT_PROPERTY < "1.70.0000"
1) Mainversion and subversion is the same (1.70.2065 -> 1.70.4076)
This can be achieved through another custom action that would process the ProductVersion property and compare the major and minor fields.
2) Mainversion and/or Subversion is different (1.70.2065 -> 1.71.7362)
This is the same as above. You can do this comparison in the same custom action.

Now, regarding the pre-population of the fields, this can be achieved through the "Set persistent property" option, but I'm afraid it can not be conditioned.

How this works, however, is by saving the value of the property in the registry and then retrieving it through a search and populating the field, so you could do that in a custom way which would allow for a condition to be set.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”