Errol
Posts: 5
Joined: Fri May 02, 2014 12:18 am

Automatic uninstall before installing new version

I am currently using Advanced Installer 11.1 Freeware on a 64-bit Windows 7 machine, with a view to using it as my primary installer application, and eventually purchasing the Professional package. I have created a simple install package, and have checked "Automatically upgrade older product versions" in the Upgrades section. This installed the program correctly.

I then compiled my program with a different version number (4.9.5.13 rather than 4.9.5.12) and created another install package. However, when I run this file, I get the message shown in the attachment. I want the new program to either uninstall the old program and all the associated files, or simply overwrite them all. Am I doing something wrong, or does Advanced Installer Freeware not offer this option? I have searched your forum for a solution to this problem, and have found suggestions of making some settings on the Media page, but the suggested options are not displayed.

I look forward to your comments.

Best regards

Errol
Errol
Posts: 5
Joined: Fri May 02, 2014 12:18 am

Re: Automatic uninstall before installing new version

Here is the attachment I mentioned in my previous post.
Uninstall_Dialog.png
Uninstall_Dialog.png (17.89 KiB) Viewed 6257 times
Errol
Posts: 5
Joined: Fri May 02, 2014 12:18 am

Re: Automatic uninstall before installing new version

OK - after more research, I realize that changing the 4th figure of a version number does not generate a new product code, so this was requiring a manual uninstall. I have tested the installer changing the 3rd number and it all works fine - thanks.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Automatic uninstall before installing new version

Hello Errol,

Indeed, Windows Installer uses only the first three fields of the product version. If you include a fourth field in your product version, the installer ignores the fourth field. You can take a look on the ProductVersion property article.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Medvezhonok
Posts: 6
Joined: Thu May 29, 2014 11:53 pm

Re: Automatic uninstall before installing new version

I am having trouble with automatic uninstall before installing new version also.

I need to use the fourth element of the Windows version, and in development and testing I sometimes need to produce a new installer without changing the version at all.

So I am going to Product Details -> Product IDs and clicking Generate All when I need to produce a new installer.

The result I am getting is that:
-- I end up with multiple entries in the Control Panel -> Programs and Features, and
-- the new executable is not actually installed until I run the installer again and let it "repair".

How can I make this work?
Using AI 11.2
Thanks for any advice you can give!

Mike [;-}>
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Automatic uninstall before installing new version

Hello Mike and welcome to Advanced Installer forums,

I strongly advise against two versions of your product having the same version number. It prevents the proper functioning of the update process.

However, should you need to have two equal version numbers yet enable them to remove each other, you can do the following:
  • go to the Upgrades page
  • enable the "Customize Advanced Installer upgrade rules" option
  • from the list, find the line with "OLDPRODUCTS" in the Property and double click it
  • tick the "Include maximum version in range" checkbox from the Product Info tab.
Make sure both your projects have this setting enabled, then rebuild them.

Note that they must have different Product Codes but the same Upgrade Code. You can make sure this is true by going to Project->Options->Project IDs.
They should now be able to remove each other.

Please let us know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”