jeudi 26 février 2015

Using command line tool SC.exe to append fail count on windows service failure

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.


So far I have



SC failure "myservice" run/0/run/""/0 reset= 86400 commad="mycommand.exe"


but how to set that value?


Thanks for help.


Aucun commentaire:

Enregistrer un commentaire