title: Using command line tool SC.exe to append fail count on windows service failure
body: <p>I am using SC.exe to configure windows service failure, I would like to run a command and pass in number of fails so far. I can check the 'Append fail to end of command line (/fail=%1%) in service properties, but I don't know how to do that from command line.</p>
  
  <p>So far I have</p>
  
  <pre><code>SC failure "myservice" run/0/run/""/0 reset= 86400 commad="mycommand.exe"
  </code></pre>
  
  <p>but how to set that value?</p>
  
  <p>Thanks for help.</p>