Read/get Windows service recovery/failure information
-
Hello! I find a lot of information how to set the recovery action for a Windows service. For instance this command:
sc failure "Service name" reset= 86400 actions= restart/60000/restart/60000/restart/60000
This command will set the reset error-counter after 86400 seconds and have three actions to restart the service after 60000ms. Is there some command I can use to get the recovery/failure information from a Windows service? Best regards, /Steffe
-
Hello! I find a lot of information how to set the recovery action for a Windows service. For instance this command:
sc failure "Service name" reset= 86400 actions= restart/60000/restart/60000/restart/60000
This command will set the reset error-counter after 86400 seconds and have three actions to restart the service after 60000ms. Is there some command I can use to get the recovery/failure information from a Windows service? Best regards, /Steffe
See: Service Functions[^] Particularly
QueryServiceConfig
&QueryServiceConfig2
.The difficult we do right away... ...the impossible takes slightly longer.
-
See: Service Functions[^] Particularly
QueryServiceConfig
&QueryServiceConfig2
.The difficult we do right away... ...the impossible takes slightly longer.
-
Not really on-topic for a programming forum, but you should be able to use sc qfailure {service}[^] to list the failure actions.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Not really on-topic for a programming forum, but you should be able to use sc qfailure {service}[^] to list the failure actions.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer