0
votes

Hi I've seen other questions on this topic, but nothing I try seems to work. On uninstall of my product I get many messages in my log file like this: Disallowing uninstallation of component: {895A2232-90E3-417B-AF3D-A4F5A8D1C225} since another client exists

This post... Wix does not remove service and files on uninstall ... prompted me to run MsiInv, which logged this a few times: 'Component x has no parent product'

This post: http://www.itninja.com/question/disallowing-uninstallation-of-component-xxx prompted me to find and delete the orphan entries... I've even tried running AVG registry cleaner.

However the files are still not removed on an uninstall. So I've been testing the solutions above (e.g. removing orphan registry entries) by uninstalling, then manually removing the files, then updating the product version and reinstalling.

Relevant code snippets:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" 
       Name="My Product Name" 
       Language="1033" 
       Version="1.0.118.0"
       Manufacturer="My Company Name"
       UpgradeCode="DEA53C73-EE29-4D5E-A3FF-0A09D0F50AF3">

    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<!--<UIRef Id="WixUI_Minimal" />-->

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />

<!-- Force administrator-->
<Property Id="MSIUSEREALADMINDETECTION" Value="1" />

    <Feature Id="ProductFeature" Title="My Installer Name" Level="1">
        <ComponentGroupRef Id="ProductComponents" />
</Feature>
...
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
  <Component Id="CMP_INSTALL_FOLDER" Guid="DA711C12-A960-421F-A6A9-5ECF0DEEE2BC" Permanent ="no">
    <RemoveFolder Id='RemovInstallFolder' Directory='INSTALLFOLDER' On='uninstall' />
    <RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]\InstallFolder' Type='string' Value='' KeyPath='yes' />
  </Component>


  <Component Id="exampleComponent"
        Guid="A0AFBE29-6962-4491-9D2F-D08E0B31C6BA" Permanent ="no">
        <File Id="exampleComponentName"
        Source="exampleSource"
        KeyPath="yes" />
  </Component>

</ComponentGroup>
1
Where are you testing? On a clean machine (freshly image or checkpoint applied?) or on a dev machine that's been around a long time?Christopher Painter

1 Answers

0
votes

Thanks to Chris for suggesting testing on a fresh image. That led me to the answer. My problem was that a custom action (which was running an executable) was failing. Once I put a condition of 'NOT installed' to prevent that custom action running on uninstall it started to work

    <InstallExecuteSequence>
  <Custom Action="CA_RunRegisterDLLScript" After="InstallFiles" >
    NOT Installed
  </Custom>
</InstallExecuteSequence>

It still doesn't work on the dev machine - I'm giving up on that...

One other tip that I learned along the way was how to find root cause problems in a verbose MSI log file. Short answer - Look for "return value = 3" - the problem's almost always just above it
I found this tip here: http://blogs.msdn.com/b/astebner/archive/2005/08/01/446328.aspx