Using WiX-Toolset there's the requirement to be able to install a service optionally, but by default it will not be installed.
A dialog was created, which is called after the Lincense Agreement.
In this dialog.wxs there is the following code
<UI>
<?define OutlookSyncTitle="title" ?>
<?define OutlookSyncDescription="description" ?>
<Property Id="OUTLOOKSYNC_CHECKED" Secure="yes"/>
<Dialog Id="OutlookSyncDlg_HK" Width="370" Height="270" Title="$(var.OutlookSyncTitle)">
<Control Id="OutlookSync" Type="CheckBox" X="20" Y="45" Width="330" Height="18"
CheckBoxValue="1" Property="OUTLOOKSYNC_CHECKED" Text="$(var.OutlookSyncDescription)">
</Control>
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" />
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
</Dialog>
</UI>
In the product.wxs there is the following feature
<Feature Id="OutlookSync" Title="TestServiceInstaller" Level="0">
<Condition Level="1"><![CDATA[OUTLOOKSYNC_CHECKED = "1"]]></Condition>
<ComponentGroupRef Id="ServiceComponent" />
</Feature>
The service never gets installed. When I set a default value for OUTLOOKSYNC_CHECKED = 1, it will always get installed.
What am I missing?