AlexThunder
Posts: 15
Joined: Mon Sep 06, 2021 3:30 pm

Uninstall is not working for EXE Setup with resources next to it

Mon Sep 06, 2021 3:53 pm

Hello,
I have an installer with two different Builds in it. One is a Single EXE Setup with resources inside named "Default Build" and the other one is a EXE Setup with resources next to it, named "Update".

With the Default Build, everything works nice and as expected. But the Update build leads to an error when I try to unistall the product using the standard windows function for this. It just doesn't uninstall any of the file and the program entry remains in the list of installed programs after the unistall wizard finished. It looks like, the installer lost track of the files, because I'm also able to run the installer more than once for the same version of my product. Normally the installation would stop right at the beginning saying that the product is already installed.

I know that you have to check the option "Do not delete extracted MSI and CAB files" to prevent this error and this option is checked for my Default Build. But for the Update Build -which is a EXE setup with resources next to it- this option is not available.

I'm using the Update Build to have a smaller installer in case I don't need all the prerequisites that are needed for the first time installation. I use the Default Build in that case - I hope that makes any sense but it worked for years now. I have older products that are actually still work just that way and also the Update installer works just fine. But newer products do not and I already started to compare the project file with an text editor without any luck :-(

Can someone help me?

AlexThunder
Posts: 15
Joined: Mon Sep 06, 2021 3:30 pm

Re: Uninstall is not working for EXE Setup with resources next to it

Tue Sep 07, 2021 3:07 pm

Hey there,

anyone an idea? Is more information needed?

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Uninstall is not working for EXE Setup with resources next to it

Tue Sep 07, 2021 4:33 pm

Hi Alex,

Sorry for the late reply, we were quite busy these days.
It looks like, the installer lost track of the files, because I'm also able to run the installer more than once for the same version of my product. Normally the installation would stop right at the beginning saying that the product is already installed.
That's odd. Are you able to replicate the behavior on multiple machines? I recommend to use a clean machine for testing.

If you're able to replicate the behavior, can you please send us the .AIP (project file) and a verbose log of the install and uninstall process to support at advancedinstaller dot com so we can investigate it? If it contains confidential information you can send us a small test project which reproduce this behavior.

Normally the installation would stop right at the beginning saying that the product is already installed.
If you run the same installation package for the second time then Windows Installer will run the installer in maintenance mode and the user will then be presented with choices to alter the installed product, repair it or remove it (done through the MaintenanceTypeDlg). This is happening because the installation package has the same PackageCode GUID. No two .msi files should ever have the same PackageCode unless they are identical.
I'm using the Update Build to have a smaller installer in case I don't need all the prerequisites that are needed for the first time installation.
Please note that you can include a prerequisite just in specific builds. For details, please check the Add a prerequisite for a build configuration article.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

AlexThunder
Posts: 15
Joined: Mon Sep 06, 2021 3:30 pm

Re: Uninstall is not working for EXE Setup with resources next to it

Wed Sep 08, 2021 10:16 am

Thank you Dan for the answer! Because of the hint about the possibility to include/exclude prerequisites on a build basis, I changed the Package Type of my Update installer to "Single Exe setup (resources inside)" and excluded the prerequsites that I don't need for the update case.
But that didn't change the behavior of the setup - it is still not uninstalling the product when I used the Update Build to install it.
Because I don't want any user interaction in case of the update installation, I choosed the option "Limit to basic user interface (...)" for the update build. Just to give it a try, I changed it one time and did not choose this option -> beside a strange looking dialog for choosing to repair/remove the program it worked just fine in that case. But I need it to work with the option "Limit to basic user interface"
Does that help you to get closer to a solution?

AlexThunder
Posts: 15
Joined: Mon Sep 06, 2021 3:30 pm

Re: Uninstall is not working for EXE Setup with resources next to it

Wed Sep 08, 2021 10:31 am

I just saw that -in case of uninstalling the program the msiexec is called with the paramter /i. Shouldn't it be /x ?? I manually tried to do this with the /x param and it worked just fine... Why is windows calling the msiexec with /i instead of /x and how can i modify that from within Advanced installer?

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Uninstall is not working for EXE Setup with resources next to it

Thu Sep 09, 2021 8:32 am

Hi Alex,
I just saw that -in case of uninstalling the program the msiexec is called with the paramter /i. Shouldn't it be /x ?? I manually tried to do this with the /x param and it worked just fine... Why is windows calling the msiexec with /i instead of /x and how can i modify that from within Advanced installer?
The setup is launched with the /i parameter because you have the Use a single "Uninstall/Change" button instead of separate buttons for each operation option enabled in the Product Details view:
ProductDetails view.PNG
ProductDetails view.PNG (6.93KiB)Viewed 34769 times


So, having it with the /i is correct.

I've tried to replicate the behavior in a new sample project but I was not able, everything worked just fine. You said that the DefaultBuild works just fine, only the Update has this problem.
In this case, I would recommend you to remove the Update build from the project and use the duplicate option to create a new copy of the build that works. After that, you can go in the Prerequisite view and include the prerequisites only in DefaultBuild.

When using the Duplicate option this will create a new build with exactly the same settings and content. Content means: prerequisites, features, searches, launch conditions.
Duplicate build.png
Duplicate build.png (32.92KiB)Viewed 34769 times

Please let me know if duplicated build works as expected.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”