title: Inno Setup: Installing Windows services using "sc create"
body: <p>I have two binaries and have to create a service for them. I tried a solution using "sc create" from <a href="https://stackoverflow.com/q/15204587/850848">How to install a Windows service with Inno Setup?</a></p>
  
  <p>But it did not work for me. It's getting stuck at the end of the installation. What am I doing wrong?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>Filename: {cmd}; Parameters: "sc create srvname start= auto DisplayName= mysrv binPath= {app}\mybinary.exe" ; Flags: runhidden
  </code></pre>
  
  <p>I tried using <code>cmd</code> instead of <code>{cmd}</code> - no change. </p>
  
  <p>I did not try the Pascal code in the solution which I referred. I am keeping it as the last resort. </p>