(Un)Install MSI Setup same as uninstalling from add/remove?

Got a problem you cannot solve? Try here.

(Un)Install MSI Setup same as uninstalling from add/remove?

Postby jsmith » Thu Dec 04, 2008 8:50 am

If I install a package that was built with InstallAware, then I upgrade the package, the old version is removed as a pre-requisite by calling (Un)Install MSI Setup with the product code of the old version. Does this do the exact same thing as if I were to open Add or Remove Programs and uninstall the old version manually?

My concern is that it does not. If calling (Un)Install MSI Setup to remove the old version does cause the MSIcode of the old installer to be executed, I believe there is a serious problem. My setup runs custom actions on uninstall. In my "Perform Uninstallation" region, I have a Call DLL Function call to execute the custom action before calling Apply Uninstall. Now, if this block of code is not executed in the original setup.exe when I call (Un)Install MSI Setup from the new setup.exe, then my custom actions will not execute.

As a workaround, I have considered calling the old custom action from the new setup before calling (Un)Install MSI Setup in the new setup.exe when processing the Previous Version Uninstallation, but that seems like a hack at best, and is more likely just wrong. I cannot be sure that the old custom action method for uninstall has the same signature that I am trying to call it with in the new setup.exe. The old uninstall custom action needs to be called from the old setup.exe to be sure it is called correctly.

InstallAware folks, can you tell me if the "Perform Uninstallation" section of the MSIcode of the old setup.exe is exectuted when the old version is removed by calling (Un)Install MSI Setup from the new setup.exe? Thanks.
jsmith
 
Posts: 178
Joined: Tue Nov 04, 2008 10:47 am

Postby jsmith » Thu Dec 04, 2008 9:47 am

I put a message box in my uninstall custom action. The message box appears if I launch the uninstall manually from Add or Remove Programs, but it does not appear if I uninstall by calling (Un)Install MSI Setup during the upgrade in the new setup.exe. This pretty clearly suggests that calling (Un)Install MSI Setup to remove the old version does not run the MSIcode of the old installer. This seems like a rather serious flaw to me because it means that uninstall custom actions are not processed.

As a workaround, I am going to investigate if instead of calling (Un)Install MSI Setup, if it makes sense to get the UninstallString from HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall for my product, and use Run Program to run the old uninstall silently.
jsmith
 
Posts: 178
Joined: Tue Nov 04, 2008 10:47 am

Postby jsmith » Thu Dec 04, 2008 2:01 pm

jsmith wrote:As a workaround, I am going to investigate if instead of calling (Un)Install MSI Setup, if it makes sense to get the UninstallString from HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall for my product, and use Run Program to run the old uninstall silently.


This totally works, as Adam Savage would say.

Read Registry Key HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$PRODUCTCODE$\\UninstallString into OLDINSTALLER

Run Program $OLDINSTALLER$ /s REMOVE=TRUE MODIFY=FALSE REPAIR=FALSE (WAIT)
jsmith
 
Posts: 178
Joined: Tue Nov 04, 2008 10:47 am

Re: (Un)Install MSI Setup same as uninstalling from add/remo

Postby gsRon » Mon Jun 11, 2012 8:38 pm

We run processes on the uninstall of our app, so we use the 'Run Program $OLDINSTALLER$ ...' method to get the old installer uninstall code to execute.

The down side to this is not getting any progress information.

If we use the 'Install / Remove MSI Package' to uninstall, we get progress information, but our uninstall processing does not run.

Is it possible to get both?

Ron.
gsRon
 
Posts: 20
Joined: Sun Sep 14, 2008 10:21 pm

Re: (Un)Install MSI Setup same as uninstalling from add/remo

Postby FrancescoT » Tue Jun 12, 2012 7:22 am

Dear Ron,

"Install / Remove MSI Package" command must point to an MSI file otherwise doesn't works.

If you can't use it, you can only execute it with Run command ... but without any progress info.

Regards
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
FrancescoT
Site Admin
 
Posts: 1900
Joined: Sun Aug 22, 2010 4:28 am


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest