lornemartin
Posts: 11
Joined: Tue Jul 19, 2022 1:18 am

uninstaller not removing files

Tue Sep 27, 2022 1:12 pm

My uninstaller won't remove the files from my main dev machine anymore. After doing some research I'm thinking the problem is that there's some leftover info in the registry from a previous version that did not uninstall properly. I've been using the Microsoft Uninstall troubleshooter that I downloaded from https://www.dell.com/support/kbdoc/en- ... s#Method_V. I've entered the last several ProductCodes from my Git history in the .aip file, but so far haven't been able fix the problem. Do you have any more resources about how to clean up the registry? I have verified it is only on my main dev machine that the problem exists, but I would like to get it fixed. I am trying to attach my uninstaller logs for reference, but haven't been able to get them to upload. Here is a dropbox link. https://www.dropbox.com/s/miyjfsdrdycno ... t.LOG?dl=0

Liviu
Posts: 1035
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: uninstaller not removing files

Wed Sep 28, 2022 9:00 am

Hello,

The files are not removed because are shared between multiple installations.

In the uninstall log file you can find multiple lines like this:
MSI (c) (B8:AC) [08:00:25:814]: Disallowing uninstallation of component: {9E6DB504-23AF-419E-8E70-B165ADAB88F0} since another client exists
MSI (c) (B8:AC) [08:00:25:814]: Disallowing uninstallation of component: {5C84D46D-4C36-4B32-AFF0-76138A55BA55} since another client exists
MSI (c) (B8:AC) [08:00:25:814]: Disallowing uninstallation of component: {55D7E9B3-36AD-4BA2-8140-F83BEF3ED7DD} since another client exists
MSI (c) (B8:AC) [08:00:25:814]: Disallowing uninstallation of component: {64C6D793-7F93-48D5-858F-F2FA37605B4C} since another client exists
MSI (c) (B8:AC) [08:00:25:814]: Disallowing uninstallation of component: {94257185-7702-4E9F-9AE0-695401241C1A} since another client exists
(the list is bigger, but I selected only a few of them)

Basically, this means that your files are somehow shared between multiple setups.

Every resource from an installation package has 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 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.

With that being said, you have another application installed that uses these files. You need to remove that application (or applications) as well.

Unfortunately I'm not aware of any solution other than the Microsoft Fix it tool when a broken installation is left on your computer. But there is not the case of broken installation.

Hope this helps!

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

lornemartin
Posts: 11
Joined: Tue Jul 19, 2022 1:18 am

Re: uninstaller not removing files

Wed Sep 28, 2022 11:26 am

I ended up running this powershell script, and it fixed my problem. Make sure you back up your registry before trying this! Credits to Stackoverflow for the idea. https://stackoverflow.com/questions/26 ... ponent-sin

Code: Select all

$productName = "DrawBridge Agent"  # this should basically match against your previous
# installation path. Make sure that you don't mess with other components used 
# by any other MSI package

$components = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\
$count = 0

foreach ($c in $components) 
{
    foreach($p in $c.Property)
    {
        $propValue = (Get-ItemProperty "Registry::$($c.Name)" -Name "$($p)")."$($p)"
        if ($propValue -match $productName) 
        {
            Write-Output $propValue
            $count++
            Remove-Item "Registry::$($c.Name)" -Recurse
        }
    }
}

Write-Host "$($count) key(s) removed"

Liviu
Posts: 1035
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: uninstaller not removing files

Wed Sep 28, 2022 11:44 am

Hello,

I'm glad you got this working. Thank you for your follow-up on this and for sharing it with us!

I am sure this will be of help for other users facing a similar scenario.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”