Brahnsuk
Posts: 38
Joined: Thu Feb 10, 2011 6:06 pm

"Upgrades" - Uninstall old Prerequisites

Tue Oct 15, 2019 2:16 pm

Hi,

for our new major version of our product I added some updated prerequisites (Access Database Engine 2016). In that order I want to de-/uninstall an old prerequisite (Access Database Engine 2010).
So I searched in the forum and found, that the "Upgrades"-Page is exatly what I want and need. "ADE" is a MSI-package; I know the Upgrade-Code and I added a entry for that package via the wizard. I tested it once and it behavious like it should, so I updated our installer further.
Unfornatuely now this part doesn't work anymore. For a test I created a new project, created the entry at the "Upgrade"-page exactly like in our main-installer and it works again.
Then I compared the log-files, the product got found in our installer but the action "RemoveExistingProducts" don't appear in the log-files.

Are there any requirements to be considered? Should I send you the *.aip and/or log-files?

Thanks in advanced
Current Version of AI: 16.5

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: "Upgrades" - Uninstall old Prerequisites

Wed Oct 16, 2019 1:56 pm

Hi,

Normally, if you add a new version of "Access Database Engine" as a prerequisite, it should upgrade automatically the old version that is found on the user's machine without adding its Upgrade Code in the "Upgrades" page.

If you use the "Upgrades" page support, the uninstall will be done during the install phase of the main package, which is after the installation of the "pre-install" and "feature-based" prerequisites. In this case, the main package will remove the prerequisite completely from the machine.

Did you test your scenario on multiple clean machines? If so, please send me the project and verbose log files to support at advancedinstaller dot com, so I can investigate them.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Brahnsuk
Posts: 38
Joined: Thu Feb 10, 2011 6:06 pm

Re: "Upgrades" - Uninstall old Prerequisites

Thu Oct 17, 2019 9:00 am

Hi Eusebiu,

thank you for your response.

Your information about the sequence when this happens is the key. I thought the "Upgrades"-action are done after the prerequisites and _before_ the main installation. I've added the ADE as a feature based prerequisite.
Is there a way to change the order of the actions without using a batch-file in combination with a custom action, as I already read in some other post's?

Unfortunatly the newer version of the ADE get installed side-by-side with the old version. And in some situations there is a bit-architecture mismatch between the old and new version, this is why I need to get sure that the old ADE version gets uninstalled.
Current Version of AI: 16.5

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: "Upgrades" - Uninstall old Prerequisites

Thu Oct 17, 2019 2:42 pm

Hi,

What you thought is correct, the "Upgrades" actions are done after the "feature-based" prerequisites are installed and before the installation of the main package.

If the two versions of ADE are installed side by side, then you can use the "Upgrade" support to remove the older version even though the new one has already been installed. But this will work only if the two versions have a different Upgrade Code, otherwise both versions will be uninstalled.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Nerdiculous
Posts: 7
Joined: Tue Jul 28, 2020 9:23 pm

Re: "Upgrades" - Uninstall old Prerequisites

Fri Oct 23, 2020 3:41 pm

I have a similar issue with POS for .NET except in my situation, the new version of POS for .NET will not install until the old version is removed. What do you suggest?

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: "Upgrades" - Uninstall old Prerequisites

Tue Oct 27, 2020 12:53 pm

Hi,

You can try to add a BAT file that will remove the old version of the prerequisite just before the new version is installed. The BAT file can be added as a prerequisite either.

Let me know if this helped, otherwise give me more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Nerdiculous
Posts: 7
Joined: Tue Jul 28, 2020 9:23 pm

Re: "Upgrades" - Uninstall old Prerequisites

Tue Dec 08, 2020 10:46 pm

I was able to resolve this by...
  • added "File to Search"
    • Name: dotnet.exe
    • RESULT_PROPERTY: NETCORE
  • added "File to Search"
    • Name: dotnet.exe
    • Min version: 3.100.420.22103
    • Max version: 3.100.420.22103
    • RESULT_PROPERTY: NETCORE_314
  • added the "Microsoft .NET Core SDK Uninstall Tool" as a pre-install prerequisite
  • added a "Launch File" custom action right after "Begin" in the "Wizard Dialogs Stage".
    • "Launch File" Custom Action
      • File to launch: C:\Program Files (x86)\dotnet-core-uninstall\dotnet-core-uninstall.exe
      • Command line: remove --hosting-bundle --all -y --force
      • Condition: NETCORE <> "" AND NETCORE_314 = ""

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: "Upgrades" - Uninstall old Prerequisites

Wed Dec 09, 2020 7:57 am

Hi,

Thank you for sharing your solution with us. It will surely help other users that will need to implement a similar scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”