My installer has to append a value to an existing multistring registry key (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA\Notification Packages):
<RegistryKey Id='RegistryEntry' Root='HKLM' Key='SYSTEM\CurrentControlSet\Control\Lsa' Action="createAndRemoveOnUninstall">
<RegistryValue Type='multiString' Name='Notification Packages' Value='p1' Action='append'/>
</RegistryKey>
Problem is that, when uninstalling, it is removing the whole key : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA ie. all values under LSA are deleted, is there any way that i can just delete the value i appended (only p1) and retain the existing values?
The documentation for WiX’s
<RegistryKey>element says (emphasis mine):Additional evidence suggests that the behavior described above applies to multi-string values: the installer engine will automatically remove the appended values on uninstall, preserving the values that were present before the installation.
Therefore, using
createinstead ofcreateAndRemoveOnUninstallshould do what you want: