title: Configure service to Delayed Auto-Start (and Auto-start on XP/2003)
body: <p>I have a WiX script, that does installation of service. I have following <code>ServiceInstall</code> element under <code>Component</code>.</p>
  
  <pre><code>&lt;ServiceInstall Id="ServiceInstaller" Type="ownProcess" Vital="yes"
                  Name="abc" DisplayName="abc service"
                  Description="It does this" Start="auto"
                  Account="LocalSystem" ErrorControl="normal" Interactive="no"&gt;
    &lt;ServiceConfig DelayedAutoStart="yes" OnInstall="yes" OnReinstall ="yes" /&gt;
  &lt;/ServiceInstall&gt;
  </code></pre>
  
  <p>And as seen from the code, I am using <code>ServiceConfig</code> with <strong><code>DelayedAutoStart</code></strong> flag to set the service to start in delayed auto start mode. However the WiX compiler (<code>candle.exe</code>) triggers a warning:</p>
  
  <blockquote>
    <p>warning CNDL1150: ServiceConfig functionality is documented in the
    Windows Installer SDK to "not [work] as expected." Consider replacing
    ServiceConfig with the WixUtilExtension ServiceConfig element.</p>
  </blockquote>
  
  <p>Hence, I tried using <code>util:ServiceConfig</code>^, however this element doesn't have any attribute to control service startup.</p>
  
  <p><strong>^</strong> Namespace import:</p>
  
  <pre><code>&lt;Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'
    xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"&gt; 
  </code></pre>
  
  <p>Hence, the questions are simply:</p>
  
  <ol>
  <li>How to set service startup to be Automatic (Delayed Start)?</li>
  <li>How to conditionally do it only on Vista and above, and do normal (Automatic) on Windows XP/2003?</li>
  </ol>