andyeaust
Posts: 20
Joined: Mon Mar 05, 2018 10:14 am

Uninstall Crystal Reports Runtime before installing as new prerequisite

Thu Apr 02, 2020 2:11 pm

Hello,

we have a AI-Enterprise 16.9 Project where we have to replace the "SAP Crystal Reports Runtime for .net Framework 13.0.20" with a new Release 13.0.26.
Normaly it's no Problem because we can use the UPGRADE=1 Parameter from the Install Command Line of the Prerequsite.
The Prerequisite is a feature based Package in our Project.

Problem now is, that the msi from SAP can't correctly UPGRADE it's own Package correctly (see https://wiki.scn.sap.com/wiki/display/B ... +Downloads

"If end-user use in-place upgrading from SP25 or previous version, after upgrading, they must repair the installation in Control Panel/Programs. Otherwise the ADO.Net database connection will NOT work."

Now we have to options:
1. Uninstall the old Crystal Runtime before installing the new one
2. Repair the Crystal Runtime after Upgrade

We test the "Upgrade Option" in AIP Project, but this is not uninstalling the old Crytal Runtime (don't no why)
Upgrade.PNG
Upgrade.PNG (4.68KiB)Viewed 5798 times
Upgrade1.PNG
Upgrade1.PNG (13.25KiB)Viewed 5798 times
Upgrade2.PNG
Upgrade2.PNG (11.27KiB)Viewed 5798 times
How we can deploy this scenario or how we can run automatic repair on the upgraded Crystal Runtime.

Our AI-Setup.exe must run from UI and silent Installation


Thanks for your Help
Andreas
Last edited by andyeaust on Tue May 12, 2020 3:01 pm, edited 2 times in total.

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall Crystal Reports Runtime before isntalling as new prerequisite

Tue Apr 07, 2020 10:29 am

Hello Andreas,

To be fully honest with you, I can not say for sure why the package is not uninstalled. I will try to run few tests on our end and see what I can find.

In what regards your second scenario, if the package is an MSI, then you can run msiexec with the repair option, e.g.:

Code: Select all

msiexec /f {product_code}
For more information about this, please have a look on our "Msiexec.exe Command Line" article ("Repair Options" section).

For instance, you can use a "Launch File" custom action that will launch the cmd.exe at the end of the installation and pass the repair parameters to the cmd.exe.

Hope this helps.

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

andyeaust
Posts: 20
Joined: Mon Mar 05, 2018 10:14 am

Re: Uninstall Crystal Reports Runtime before intalling as new prerequisite

Tue May 12, 2020 11:08 am

For instance, you can use a "Launch File" custom action that will launch the cmd.exe at the end of the installation and pass the repair parameters to the cmd.exe.
I checked it, but it's not working because the main msiexec is running. At wich point i have to run the "Launch File" custom action?

Can i run this also on Silent Installation with setup.exe? Because the Installation of Prerequisite runs there with aipackagegainer.exe?

I checked also the Upgrade function to remove the Package. It do nothing. When is the Uninstall with Upgrade running? Before or after Feature Based Prerequsite?

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall Crystal Reports Runtime before installing as new prerequisite

Wed May 13, 2020 2:08 pm

Hello Andreas,
I checked it, but it's not working because the main msiexec is running. At wich point i have to run the "Launch File" custom action?
The custom action should be placed after the prerequisite is upgraded.
When is the Uninstall with Upgrade running? Before or after Feature Based Prerequsite?
The removal through the "Upgrades" page happens after the installation of "feature-based" prerequisites.

With that being said, the custom action could be added at the end of the installation, after the "Finish Execution" action group. In addition to this, the custom action should run asynchronously, meaning that you should disable the "Wait for custom action to finish before proceeding" and "Fail installation if custom action returns an error" options.
Can i run this also on Silent Installation with setup.exe? Because the Installation of Prerequisite runs there with aipackagegainer.exe?
To be fully honest with you, I am not quite sure if this will work silently. The feature-based prerequisites are treated as post-install prerequisites when the main setup is run silently. Even if the aipackagechainer.exe launches the setup asynchronously and our custom is also asynchronous, two msiexec processes can not happen at the same time.

Hope this helps.

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

andyeaust
Posts: 20
Joined: Mon Mar 05, 2018 10:14 am

Re: Uninstall Crystal Reports Runtime before installing as new prerequisite

Wed May 20, 2020 2:04 pm

Hello Catalin,

thanks for your answers. We moved the Prerequisite to Post-Install. Now it's working.
It would be better if there were an option tu run before the feauture based Prerequisite.

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall Crystal Reports Runtime before installing as new prerequisite

Thu May 21, 2020 10:06 am

Hello,

Thank you for your followup on this.

I am really glad everything works as expected now.
It would be better if there were an option tu run before the feauture based Prerequisite.
I will forward this to our development team. Most probably, there is a reason why this is currently like it is, but I will talk this through with our development team and we will see if anything can be done in this matter.

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

Return to “Building Installers”