r/computertechs • u/bibleharmony • Aug 27 '15
Need help writing a script NSFW
I am not sure if I'm posting in the right place, but I need help writing a script. I am wanting to have a batch file I can run to change the Recovery options when a service fails. Right now I have to go in and manually change "First failure...", "Second failure...", but it would be so great if I could just run a batch file or script to change that for me on any computer I am working on. Can anyone point me in the right direction?
7
Upvotes
1
u/bibleharmony Aug 27 '15
Thanks again f34rinc. I tested and that worked perfect.
1
u/f34rinc Aug 27 '15
Try
This command will make a service restart after 1 minute (60000 milliseconds) on the first 2 failures, and take no action at further failures. The failures counter will be reset after 2 minutes (120 seconds)
http://ss64.com/nt/sc.html