I've created an Component with an Condition DISABLEMSIUPGRADE, which get's set when I install the MSI using our ExternalUI. However, MSI doesn't remove the entry on UnInstall. I think the problem is caused by the Condition, but I can't fix it.
<Component Id="compMSI" Guid="5f18af6a-b839-4b4d-9d4f-79cf7826f749">
<Condition>DISABLEMSIUPGRADE</Condition>
<RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(var.PGuid)" Action="createAndRemoveOnUninstall">
<RegistryValue Name="DisplayName" Type="string" Value="$(var.ProductTitle)" />
<!-- ... -->
</RegistryKey>
</Component>
I even placed RemoveRegistryKey Elements in other components to ensure the keys gets removed, but that also didnt do the job...
I also tried to store and read DISABLEMSIUPGRADE property in the Key.
//edit: I've experimented a bit and found out, that the CONDITION Element isn't the cause. I looks like if I have another version of my setup installed, the registry key doesn't get removed. What could cause that?