ales.hrodek
Posts: 65
Joined: Mon Jun 11, 2012 11:40 am

Uninstall Tomcat Application fail

Hi,

A have used you Tomcat application template. Issue I have is following:
a) Install application and then run uninstall - OK
b) Install application, upgrade to new version and then run uninstall - Uninstallation fail

In verbose log I identified problem. Uninstallation process fails here:

Code: Select all

MSI (s) (78:FC) [15:35:21:382]: Doing action: AI_DATA_SETTER_6
Action 15:35:21: AI_DATA_SETTER_6. 
Action start 15:35:21: AI_DATA_SETTER_6.
MSI (s) (78:FC) [15:35:21:382]: PROPERTY CHANGE: Adding CustomActionData property. Its value is 'cmd.exe /c reg delete "hkcu\Environment" /v CATALINA_HOME /f'.
Action ended 15:35:21: AI_DATA_SETTER_6. Return value 1.
MSI (s) (78:FC) [15:35:21:382]: Doing action: Remove_CATALINA_HOME
Action 15:35:21: Remove_CATALINA_HOME. 
Action start 15:35:21: Remove_CATALINA_HOME.
MSI (s) (78:38) [15:35:21:382]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI81.tmp, Entrypoint: CreateExeProcess

Error:  The system was unable to find the specified registry key or value
Installing new version also execute this action:

Code: Select all

MSI (s) (78:FC) [15:34:42:646]: Doing action: AI_DATA_SETTER_6
Action 15:34:42: AI_DATA_SETTER_6. 
Action start 15:34:42: AI_DATA_SETTER_6.
MSI (s) (78:FC) [15:34:42:646]: PROPERTY CHANGE: Adding CustomActionData property. Its value is 'cmd.exe /c reg delete "hkcu\Environment" /v CATALINA_HOME /f'.
Action ended 15:34:42: AI_DATA_SETTER_6. Return value 1.
MSI (s) (78:FC) [15:34:42:646]: Doing action: Remove_CATALINA_HOME
Action 15:34:42: Remove_CATALINA_HOME. 
Action start 15:34:42: Remove_CATALINA_HOME.
MSI (s) (78:4C) [15:34:42:656]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI62.tmp, Entrypoint: CreateExeProcess

The operation completed successfully

Action ended 15:34:43: Remove_CATALINA_HOME. Return value 1.
I think this is bug in your template. Could you help me to fix it?

Thank you,
Ales
ales.hrodek
Posts: 65
Joined: Mon Jun 11, 2012 11:40 am

Re: Uninstall Tomcat Application fail

Hi,

Maybe I found where is problem with your Tomcat template but need confirmation from you because I want be sure it's correct solution in all scenarios.

Change conditions for Remove_CATALINA_HOME custom action from (REMOVE = "ALL") to (REMOVE="ALL" AND (NOT UPGRADINGPRODUCTCODE))
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Uninstall Tomcat Application fail

Hello Ales,

The UPGRADINGPRODUCTCODE property is set in the MSI which is being upgraded if the package is uninstalled by a newer version.

As far as I can see, the custom action which have the (REMOVE="ALL" AND (NOT UPGRADINGPRODUCTCODE)) condition will not be executed when the uninstall is performed by a newer version and it will only be executed when a regular uninstall is made (e.g. from the Programs and Features list from Control Panel ).

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ales.hrodek
Posts: 65
Joined: Mon Jun 11, 2012 11:40 am

Re: Uninstall Tomcat Application fail

Hi Dan,

That is exactly how I understand it. I have issue with project created by your Tomcat Application Wizard. Compiled installer executing Remove_CATALINA_HOME while upgrade. I think it is error in your Tomcat template and this is suggested fix. Could you confirm it's correct and implement fix into future version of AI?

See attached projects created by wizard without any change except removing start service operation as it is not important for replication. Install version 2 over 1 and then try uninstall. It's not possible uninstall application after upgrade!

Ales Hrodek
Attachments
tc2.aip
(178.57 KiB) Downloaded 485 times
tc1.aip
(178.58 KiB) Downloaded 535 times
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Uninstall Tomcat Application fail

Hello Ales,

The Remove_CATALINA_HOME custom action remove the CATALINA_HOME environment variable.

Since you want to remove this environment variable during a regular uninstall, you should use the above condition (REMOVE="ALL" AND (NOT UPGRADINGPRODUCTCODE) ) and set the custom action to be executed on the Uninstall stage condition.
Also, I've created a sample project using the Tomcat Web Application wizard but I couldn't replicated the described behavior.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ales.hrodek
Posts: 65
Joined: Mon Jun 11, 2012 11:40 am

Re: Uninstall Tomcat Application fail

Hi Dan,

I have AI 9.9 so I installed trial 10.4 to check if I get different result but unfortunately not. When you say cannot replicate described behaviour, what does it mean exactly?

a) when you create new Tomcat project, do you have have conditions (REMOVE="ALL" AND (NOT UPGRADINGPRODUCTCODE) ) ?
or
b) when you install version 1 then upgrade to version 2 then CATALINA_HOME is present in HKCU\Envirinment ?
or
c) even CATALINA_HOME does not exists you can uninstall version 2 ?

My test environment is clean XP SP3 VPC without any additional updates. I'll email my simplified projects and log to your support email.

1) Check HKCU\Environment - CATALINA_HOME entry is not present
2) run setup1
3) Check HKCU\Environment - CATALINA_HOME entry is present
4) run setup2
5) Check HKCU\Environment - CATALINA_HOME entry is not present

Return to “Building Installers”