Shortcuts are not uninstalled after update - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

thorbon
Posts: 7
Joined: Thu Nov 24, 2011 11:14 am

Shortcuts are not uninstalled after update

Hi,

Let me first explain my implementation.
A few months ago i implemented a winform application for more than 300 internal customers. I created an installer with Advanced installer and enabled the auto updater so in the application folder there is an updater.exe and a updater.ini file (added automically by advanced installer)
After building my installer projectfile which generated the setup file, i also built my updater project file so i have also an updater.txt which i place on my webserver so auto updating is enabled.

In one of my forms i built in some code that starts the updater.exe in silent mode and checks if the version installed is lower than the version specified in the updater.txt on my webserver. If it is, it updates silently my product installation files.

Problem
A few months ago i added some shortcuts to the advance installer project file in my start menu. Now i wanted to change the name of one of these shortcuts and remove a few others.
When my application does an update, i see the old shortcut is still available and a new shortcut with the new name has been added (also after windows restart). Also all the other shortcuts are still available.
Nevertheless i marked in my advanced installer project file that it is a major upgrade but it still seems that my installed product isn't first uninstalled but just updated.

How can i fix this, so my old shortcuts are being removed or renamed?

Thank you for your help!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Shortcuts are not uninstalled after update

Hello,

You could encounter this behavior if you are using a product code which contains four fields and you change only the fourth field of the product version in your new version project. Please keep in mind that Windows Installer ignores the fourth field of the product version. So, if your first three product version fields are identical, then the new version of your application will not upgrade the old one. Please take a look on "ProductVersion property" article and set your product version accordingly if this is the case.

Also, can you tell us if your old version is uninstalled after the new version installation? You can check this in "Control Panel".

In order to upgrade an older installation you can proceed as follows:
- Open the AIP (Advanced Installer Project file) you used to build the old package.
- Make sure that the "Automatically upgrade older product versions" option is set in the "Upgrades" page.
- Make the modifications you want to include in the upgraded package.
- Go to the "Product Details" page and increase one of the first three fields of the product version .
- When you move from this page or save the project you are prompted about the update method.
- Answer "Major Upgrade" (the package's old and new version must have different Product Codes).
- Build and install the AIP.

Here are a couple of articles that should get you started with upgrades:
How do I upgrade an older version of the package?
Windows Installer Upgrades
Upgrades Page
Upgrade FAQ

Let us know if this helps, otherwise please give us more details about your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
thorbon
Posts: 7
Joined: Thu Nov 24, 2011 11:14 am

Re: Shortcuts are not uninstalled after update

Thanks for your help,
I just did the steps you described and changed the version from 1.6.1 to 2.0.0 because it's a major upgrade. I also said yes when he asked for changing the productcode.
Also in control panel i see that the previous version is uninstalled and there is now an installation of my product with the version 2.0.0.
However, the shortcuts are still available at C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Productname

I don't know why it's not automatically removed when the updater uninstalls my previous version. Maybe i need to remove these shortcuts with a file removal after installation?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Shortcuts are not uninstalled after update

Hello,

I'm not sure why you are encountering this behavior. Can you please send us both of your .AIPs (project files), version 1.6.1 and 2.0.0, and a verbose log of the upgrade installation to support at advancedinstaller dot com so we can investigate them?"

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
thorbon
Posts: 7
Joined: Thu Nov 24, 2011 11:14 am

Re: Shortcuts are not uninstalled after update

Hi,

i fixed the issue by doing a file removal of all .lnk files in my start Menu - programs - productname folder on uninstall.
When he does an upgrade, during uninstall of the older product, all shortcuts are now deleted and installed again during the installation of the new version.
Thanks for you help!

Return to “Common Problems”