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

Key Member resource change

Hi,

I have problem with upgrade. Setup is set to "Install new version first and then uninstall old version". I have synced folder and all files are added to one Component in Organization. Problem is file marked as Key Member has been deleted and other file selected as Key Member. First installation is correct but when user upgrade from previous version then all files which are part of this component are removed from PC.

What is possible solution?
Eusebiu
Posts: 4964
Joined: Wed Nov 14, 2012 2:04 pm

Re: Key Member resource change

Hi,

I'm not sure why you encounter this problem. Can you make sure that the GUID of the component from the new version is the same as the GUID of the component from the old version?

If so, can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com, so we can investigate them?

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

Re: Key Member resource change

Test project and verbose log sent to support email.
Eusebiu
Posts: 4964
Joined: Wed Nov 14, 2012 2:04 pm

Re: Key Member resource change

Hi,

I apologize for the delayed reply.

Indeed, it seems that if the key component file is changed for a component, the content of that component will be removed during the upgrade if the "Install new version first and then uninstall old version" option is selected. I'm afraid that this is the Windows Installer normal behavior.

As a workaround, you can create a custom action that will backup those upgraded files after the "Install Execution Stage -> Add Resources" action group and another custom action that restores them after the "Install Execution Stage -> Finish Execution" action group. You can see an example about this on the How to uninstall an existing application thread.

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

Re: Key Member resource change

Thank you,

I expected to be WI standard behaviour and there is no way around. I am dealing with all this just because Microsoft WI cannot preserve pinned icons when use default uninstall/install order. Users claim invalid icon in task bar is bug in our software because "other" software preserve icon.

In mean time I found some solution. I created dummy file for Key Member which I removed and created own component for each of remaining files. After upgrade all files are there with own GUID in registry. If I then remove file in future it will remove only one I want (at least I hope so). Disadvantage is everybody who will upgrade straight from pre-now release to one with removed Key file must execute installer again with "Repair" immediately after upgrade.
Eusebiu
Posts: 4964
Joined: Wed Nov 14, 2012 2:04 pm

Re: Key Member resource change

You're welcome. I'm glad you found this solution.

Is the "Repair" operation needed even if you set for the dummy key files the same name as the removed key files had?

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

Re: Key Member resource change

Hi Eusebiu,

No - Repair is required only when I decide remove dummy file in future. One more thing I must do with dummy file solution. This file does not have a version so I set User Specific to [|ProductVersion] because WI ignored componet other files update.

My situation was component with 10 files (ver 1). Then I removed 3 and this broke upgrade. I created dummy file and added it to original component as Key and 7 remaining files moved to own components (ver 2). In next version I will remove dummy file and some other files as I merging them into 1 file (ver 3).

1) Upgrade ver 1 > ver 2 > ver 3
- Works correctly and user does not spot anything.

2) Upgrade ver 1 > ver 3
- This require run "Repair" but I do not care as it's affecting max 4 customers currently using ver 1 (unfortunately one with 20+ users). I will not remove any other file before get confirmation they upgraded to ver 2.
Eusebiu
Posts: 4964
Joined: Wed Nov 14, 2012 2:04 pm

Re: Key Member resource change

Hi,

I understand your scenario, but unfortunately I cannot find a better workaround for it. You can try use the newly added Pin to taskbar feature in your next versions which might help you to get rid of these problems.

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

Return to “Building Installers”