Tailoring services for windows XP

B

Bob

I am installing Windows XP Pro and automating the setup, I have found most
things in the registry, but the settings for this next step are eluding me.

Via the keyboard and mouse and GUI, I can start the "services" snap-in for
MMC and perform the following customisations
Right-click the "SNMP Service" and choose properties.
Select the Recovery tab
Set the "First failure" dropdownlist to "Restart the Service"
Set the "Second failure" dropdownlist to "Restart the Service"
Set the "Subsequent failure" dropdownlist to "Restart the Service"
Set the "Rest failure count" to "1" day
Set the "Restart service after" to "5" minutes

How can I automate these settings from a script/batch file?

Thanks

Bob
 
T

Torgeir Bakken \(MVP\)

Bob said:
I am installing Windows XP Pro and automating the setup, I have found most
things in the registry, but the settings for this next step are eluding me.

Via the keyboard and mouse and GUI, I can start the "services" snap-in for
MMC and perform the following customisations
Right-click the "SNMP Service" and choose properties.
Select the Recovery tab
Set the "First failure" dropdownlist to "Restart the Service"
Set the "Second failure" dropdownlist to "Restart the Service"
Set the "Subsequent failure" dropdownlist to "Restart the Service"
Set the "Rest failure count" to "1" day
Set the "Restart service after" to "5" minutes

How can I automate these settings from a script/batch file?
Hi,

SC.exe and it's Failure parameter maybe:

How do I configure service recovery on remote computers?
http://www.jsiinc.com/SUBM/tip6300/rh6385.htm

Note that the above is relevant not only for remote computers,
but for local computer as well.

Also note that the article above mentions that you can do this
Recovery configuration with a registry file as well.
 
B

Bob

Torgeir Bakken (MVP) said:
Hi,

SC.exe and it's Failure parameter maybe:

How do I configure service recovery on remote computers?
http://www.jsiinc.com/SUBM/tip6300/rh6385.htm

Note that the above is relevant not only for remote computers,
but for local computer as well.

Also note that the article above mentions that you can do this
Recovery configuration with a registry file as well.


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

Thanks Torgeir,
The SC.exe command does just what I needed
Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top