Tailoring services for windows XP



Bob
07-10-2005, 02:16 AM
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

Jetro
07-10-2005, 02:16 AM
Apply changes in FailureActions value - either merge the .reg file or script
it.

Torgeir Bakken \(MVP\)
07-10-2005, 02:16 AM
Bob wrote:

> 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.


--
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

Bob
07-10-2005, 02:16 AM
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:%2324dcCIXFHA.828@TK2MSFTNGP10.phx.gbl...
> Bob wrote:
>
>> 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.
>
>
> --
> 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


Tailoring services for windows XP