I have a checkBox in the wix project UI, when the user check the box, the value is "YES", if not, the value is "NO". I want to write the value of the checkbox to registry key, but no matter whether I set it to "string" or "integer", it always failed:
<Variable Name ="InstallChecked" Value="YES" bal:Overridable="yes"/>
and
<Component Id="MyFeature" Guid="50f89678-913b-48a9-bb92-b2ad7e97ab03" Win64="yes">
<RegistryKey Root="HKLM" Key="SOFTWARE\MyDirectory\MyApp">
<RegistryValue Type="string" Name="MyFeature" Value="[InstallChecked]" KeyPath="yes"/>
</RegistryKey>
</Component>
If I set it to "integer", the installation failed on setting the registry, if I set the type to string, after installation, the registry key's value is empty.