I have a ServiceInstall component in the WiX installer, where I have a requirement to either start auto, or depending on the parameters passed to MSI.
So, the Xml element in question is
<ServiceInstall Vital="yes" Name="My Windows Service" Type="ownProcess" Account="[SERVICEUSERDOMAIN]\[SERVICEUSERNAME]" DisplayName="My Service" Password="[SERVICEUSERPASSWORD]" Start="demand" Interactive="no" Description="Something interesting here" Id="Service" ErrorControl="ignore"></ServiceInstall>
WiX will not allow PArameter to be used for the Start attribute, so Im stuck with a fully complemented component with a condition like /
<Component Id="ServiceDemand" Guid="{E204A71D-B0EB-4af0-96DB-9823605050C7}" > <Condition>SERVICESTART="demand"</Condition> ...
and completely duplicates the entire component with a different setting for Start and another condition.
Does anyone know a more elegant solution? One where I should not support 2 COmponents that do the same except for the attribute to run?
Jamiec
source share