Search code examples
compiler-errorswixregistry

Registry values with & in WiX


I'm re-writing an old installer that no longer works on Windows 10 using WiX, and I'm running into a compilation error (candle.exe) with & in my registry keys.

The registry value is as follows:

<RegistryValue Root='HKCR' Name='' Key='Access.Application.10\shell\New' Type='string' Value='&New'/>

I tried escaping it with a backslash just for kicks, but I really don't know where I can go from here.

As you can see in the image below, the registry already has that very value stored, hence the confusion on the error. enter image description here


Solution

  • Some characters in XML have to be represented by character entities. & is represented as &amp;.