I created a service in VB.NET and wanted to use the \"sc\" program to install it. (I needed to package it so that someone else in my organization could perform the actual instal
To expand on this answer, the sc command is stupidly finnicky, and you need to do a couple things:
reset=
, etcsc failure EraAgentSvc reset= 86400 actions= //
sc failure EraAgentSvc reset= 86400 actions= ////
sc failure EraAgentSvc reset= 86400 actions= //////
and those commands will end up with the result from 'sc qfailure':
C:\Users\Administrator>sc qfailure EraAgentSvc
[SC] QueryServiceConfig2 SUCCESSSERVICE_NAME: EraAgentSvc
RESET_PERIOD (in seconds) : 86400
REBOOT_MESSAGE :
COMMAND_LINE :