I'm using Wix to install a windows service, but need the option for it to use the LocalSystem account or use an account provided by the user. How should I toggle between a hard coded value and the user value? For the service I have:
<ServiceInstall Id="ServiceInstaller" Type="ownProcess" Vital="yes" Start="auto"
Account="[SERVICELOGONUSER]" Password="[SERVICELOGONPASSWORD]" ErrorControl="normal"
Interactive="no"/>
In the UI I have the property:
<Property Id="SERVICELOGONUSER" Value="LocalSystem"/>
In a dialog I have:
<Control Type="CheckBox" Width="200" Height="25" X="25" Y="75" Id="LocalCheckBox"
Property="UseLocalSystem" CheckBoxValue="1" Text="Use LocalSystem Account"/>
<Control Type="Edit" Width="200" Height="15" X="25" Y="115" Id="AccountTextbox"
Property="SERVICELOGONUSER">
<Condition Action="disable">UseLocalSystem = 1</Condition>
<Condition Action="enable"><![CDATA[UseLocalSystem <>1]]></Condition
</Control>
But this will just display the hard coded value, which the user can edit.