Reputation: 33
The registry key values are not removing during uninstall the MSI.
Below is the code sample to add values to registry. I am using NeverOverwrite ="yes" Permanent="yes" options for component because the registry values should not override during upgrade.
<Component Id="DFService_Registry" Guid="B4F1008F-1CF2-4170-94A5-2466AB15E145" Win64="yes" Directory="DFServicesDir" NeverOverwrite ="yes" Permanent="yes">
<Condition><![CDATA[INSTALL_DFSERVICES=1 AND (NOT OLDER_VERSION_FOUND)]]></Condition>
<!--Win64="yes"-->
<RegistryKey Root="HKLM" Key='SOFTWARE\VALUEMOMENTUM\DEALFOUNDRY\DealFoundryServices' Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Name="DfServicesInstalled" Value="Yes">
<![CDATA[NOT OLDER_VERSION_FOUND]]>
</RegistryValue>
<RegistryValue Type="string" Name="DfServicesWebApplicationName" Value="[DFSERVICES_WEBAPPLICATIONNAME]">
<![CDATA[NOT OLDER_VERSION_FOUND]]>
</RegistryValue>
<RegistryValue Type="string" Name="DfServicesPortNumber" Value="[DFSERVICES_PORTNUMBER]">
<![CDATA[NOT OLDER_VERSION_FOUND]]>
</RegistryValue>
<RegistryValue Type="string" Name="DfServicesInstallDir" Value="[INSTALLDFSERVICES_DIR]">
<![CDATA[NOT OLDER_VERSION_FOUND]]>
</RegistryValue>
</RegistryKey>
</Component>
Please help me.
Upvotes: 0
Views: 256
Reputation: 11
With the setting permanent="yes" the registrykeys will not deleted during uninstallation. Use permanent="No".
Upvotes: 1