Mel
Posts: 43
Joined: Fri Jul 10, 2020 10:59 am

Cant uninstall an app installed by Advanced Installer ?

I have installed an app built by Advanced installer . For some reason when i try to uninstall from control panel it doesnt uninstall.
Is there any error logs i can check or can i force uninstall ?

thanks
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: Cant uninstall an app installed by Advanced Installer ?

Hello,

This is quite strange, indeed.

You do not get any error messages during the uninstall operation?
Is there any error logs i can check or can i force uninstall ?
You can try to create a log file for the uninstall process as it follows:

- open an elevated command prompt and run:

Code: Select all

msiexec /x <path_to_msi> /L*V <path_to_log>log.txt
for an MSI setup and:

Code: Select all

setup.exe /x // /L*V <path_to_log>log.txt
for an EXE setup.

If you require any assistance in reading the log file, please forward it to me so I can further investigate it.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Mel
Posts: 43
Joined: Fri Jul 10, 2020 10:59 am

Re: Cant uninstall an app installed by Advanced Installer ?

Hi ,
I have now found that when i uninstall , it doesnt actually delete the directories. All the files in these directories are installed by Advanced installer.
I have a log file. What i could see that may cause an issue is I am getting quite a few of these entries in the log file

Disallowing uninstallation of component: {GUID} since another client exists
Disallowing uninstallation of component: {GUID} since another client exists
Disallowing uninstallation of component: {GUID} since another client exists
Disallowing uninstallation of component: {GUID} since another client exists
Disallowing uninstallation of component: {GUID} since another client exists
Disallowing uninstallation of component: {GUID} since another client exists
Disallowing uninstallation of component: {GUID} since another client exists

I have used "MicrosoftProgram_Install_and_Uninstall.meta.cab" to uninstall just in case.
But when i actually uninstall I can reinstall which suggests it has checked if the Product Code is present and its not , but the install directories remain.

Also I have check boxes for the user to select when they Modify the install and for example if they select 1 checkbox that says "Uninstall WinService.exe" it will just delete 1 file in a directory and another checkbox which if checked should delete and installed directory. These no longer work.

I have found that it works perfectly on Windows 10 Home but these issues are with Windows Server 2019 DataCenter.

Now in further investigating , if i use the uninstall cleanup on the directories for a complete uninstall the directories go, but what about the Modify Option ?


thanks
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: Cant uninstall an app installed by Advanced Installer ?

Hello,
Disallowing uninstallation of component: {GUID} since another client exists
This means that your files are somehow shared between multiple setups.

Every resource from an installation package have a component assigned. A component is a piece of the application or product to be installed. Examples of components include single files, a group of related files, registry keys, resources, etc.

If you find the above lines in the log file, then this is the reason why your files or registry entries are not removed. Basically, this can happen if the same components are shared between multiple packages installed on the same machine. Windows Installer keeps a refcount (reference count) for the components and does not allow removing them until all the applications that use them are removed.

Please have a look on the "Why files are left behind after package uninstall" article for more information about this.

If the software (the setup) is not yet distributed, it is a high chance that this may be particular to your developer machine only. With that being said, please try and test this on a Virtual Machine (with a clean OS installed) and let me know if this still reproduces.


Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Mel
Posts: 43
Joined: Fri Jul 10, 2020 10:59 am

Re: Cant uninstall an app installed by Advanced Installer ?

Hi,

But that same installer has been tested on a Windows 10 machine which has had previous versions of the installer.So on Windows 10 machine I've been installing and uninstalling numerous times.

Also registry entries are removed because if i try to re-install it allows me.

One other thing the "Uninstall Cleanup" removes the files.
But on a component I have a Install Behavior in the attached image and this not longer works.
So that behavior is on a component which has one .exe file and if the checkbox is unchecked on and Install file wont be installed, if on a Modify the file will be deleted if installed.

So what my steps were
1) Created a Dialog with a checkbox and gave the property : CHECKBOX_MYSERVICE_PROP
2) Went to Organization and created a Feature , now one question , the Feature Properties Indentifier , is that meant to be defined somewhere?
3) Went to Files and Folders and selected the .exe file , right click and add to feature, navigated to the feature and it was there.
4) From the image above if the user does an install and that check box is not selected it wont install it , But if they run the setup again and do a MODIFY, if they select the check box it should install the .exe , it doesnt and i cant see why would that happen ?

Also if I do a total uninstall of the app, the shortcuts are left behind in the start menu ?


Image

If the files are somehow shared between multiple setups, how can i check this ?

thanks
Attachments
12.PNG
12.PNG (7.41 KiB) Viewed 4869 times
Mel
Posts: 43
Joined: Fri Jul 10, 2020 10:59 am

Re: Cant uninstall an app installed by Advanced Installer ?

Can anyone help or suggest something ?
Because of this issue with conditional file deletion in Advanced Installer the app can't really be released so i really need some assistance with this.
Thanks
Mel
Posts: 43
Joined: Fri Jul 10, 2020 10:59 am

Re: Cant uninstall an app installed by Advanced Installer ?

The aip has signature and details which are encrypted which I prefer to keep secure.

Would it be possible to help me by providing a simple aip file that install a .exe file conditionally that is if a check box is selected when first installing and during modify if the checkbox is not selected then the file is deleted ?
Thanks for your understanding.


cheers
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: Cant uninstall an app installed by Advanced Installer ?

Hello,

First of all, regarding this:
4) From the image above if the user does an install and that check box is not selected it wont install it , But if they run the setup again and do a MODIFY, if they select the check box it should install the .exe , it doesnt and i cant see why would that happen ?
Here is how you could proceed to achieve that:

- create a new dialog and add your checkbox to it

- also add the dialog in "Dialogs" page --> under "Maintenance"

- on the "Next" button of the dialog, under "Published Events" add two events:
UninstallInstallFeature.png
UninstallInstallFeature.png (27.13 KiB) Viewed 4738 times
One event that will change the feature state to "Install" if the checkbox is checked and one that will change the feature state to "Uninstall" if the checkbox is not checked.

Regarding the shared resources, a component is shared between multiple setups when:

- the component uses the same name and the same GUID in all packages. Most of the time, this happens when you are using the same .AIP to create another package that is similar to the one you already have.

For instance, if you have a package and want to create a brand new one which just contains one more file than the previous, you copy the .AIP file and create the new package from that. When doing this, you will end up with two packages having the exact same components + GUIDS, resulting in shared components.

Please note that this is not recommended, the reason being the one presented above. If you want to achieve something similar with what I have described above, you can use the "Save as Template" option.

- the file is installed in the same location by all packages

This way, Windows Installer will see the component as shared between packages and it will use a reference count for it. Installing a package with the shared component will increase the reference count and uninstalling one will decrease the reference count. The component is removed when the last package which contains it is uninstalled (the reference count reaches 0).
If the files are somehow shared between multiple setups, how can i check this ?
Like most things on Windows, these are saved in the registry. For instance, I have recreated this behavior by doing what I have mentioned above (created two projects from the same .AIP) --> both containing the same EXE file, whose component had the same GUID in both projects:
SharedComponent.png
SharedComponent.png (155.83 KiB) Viewed 4738 times

As you can see above, the component having the packed GUID {772FEACF7B87F0841BC3462A4A99AA8B} is shared between two setups.

The component has the following GUID in my project:
GUID.png
GUID.png (40.32 KiB) Viewed 4738 times

while its' Packed GUID is:
PackedGUID.png
PackedGUID.png (12.04 KiB) Viewed 4738 times

The concept of a Packed GUID is explained in the "Why files are left behind after package uninstall?" FAQ I have linked above.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”