In Windows Install XML toolset, to install a service, we group <ServiceInstall>
with a <File>
in a <Component>
. To conditionally install the service, we put <Condition>
under the <Component>
. However if the condition is false, the file will not be installed too. If I put the <File>
in an unconditional <Component>
, then the service has no executable file path and thus installation will fail. If I put the <File>
in both <Component>
, duplicate symbols will be found.
The question is, can we install a service conditionally, but install the associated executable file unconditionally?
Thanks!