linggol
Posts: 13
Joined: Tue Apr 21, 2009 4:19 pm

Fixing uninstallation of previous version

Hi,
the uninstaller of the previous version of our product produces an error message when the user does an upgrade to the next version. The problem is a wrong condition for a custom action in the old setup, which should only run during installation. The Execution Condition is: "NOT Installed OR UPGRADINGPRODUCTCODE", which is obviously wrong.

Do you see any chance to influence this condition by the installer of the new version? I can think of running the uninstalltion without the UPGRADINGPRODUCTCODE property set, but cannot find a way to implement it.

BTW: We use AdvancedInstaller 7.7 Enterprise

Thanks in advance,
Oliver.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Fixing uninstallation of previous version

Hi Oliver,

The correct solution is to repare the condition in the old version project, rebuild the MSI and recache it.

You can automate the recaching operation from the new version installer quite easily. So after you have the MSI of the old version fixed
go to Files and Folders page and add it as a temporary file, not as standard file. Double click the file and copy its attached property.

After you have done this go to Custom actions page and add a "Launch File" predefined custom action, then set the "File" field to this:

Code: Select all

[SystemFolder]msiexec.exe /fv "[SETUP.MSI_PROPERTY]"
Make sure you schedule this custom action after "Searches" group from "Wizards Dialogs Stage". You cannot execute it under Install Execute stage.
Also, set its condition to be executed only on install, that performs an upgrade.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
linggol
Posts: 13
Joined: Tue Apr 21, 2009 4:19 pm

Re: Fixing uninstallation of previous version

Thanks Bogdan!

I created a patched MSI and it worked - at least if the user is an administrator. We have the situation that the user installing the software is not an administrator, but we use some kind of automatic rights elevation tool for certain programs. In this case an error box appears informing the user that the system administrator has set a policy which prevents this software from installing. I guess the recaching is not done with elevated rights during the first steps of the new installer.

Do you have any additional hint for me how to solve this problem?

Best regards,
Oliver.

Return to “Common Problems”