Q: Uninstall results in Registry Key removal (not just Registry Key property)

Aug 18, 2015 at 1:49 AM
I wan't my installer to add the Registry Key property, but not remove it (or the Registry Key!) during an uninstall. How can I avoid this? (I'm using VS 2013 to build this).

Code is a VERY simple installer
Project project = new Project("Personal Office Document Templates",
            new RegFile(@"Office personal template location.reg")

        project.GUID = new Guid("<REMOVED>"); 

Registry file is as follows
Windows Registry Editor Version 5.00

"PersonalTemplates"="C:\Program Files (x86)\UNIFY Solutions\Office Document Templates"

"PersonalTemplates"="C:\Program Files (x86)\UNIFY Solutions\Office Document Templates"


Aug 19, 2015 at 2:34 AM
Edited Aug 19, 2015 at 1:41 PM
WiX requires use of the 'Permanent' component attribute for that. You can control it either per Reg value or for all of them in a single step as follows:
project.RegValues.ForEach(r => r.AttributesDefinition = "Component:Permanent=yes");
Aug 19, 2015 at 9:07 AM
Marvelous, thank you!