473,394 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Windows Service Recovery Property?

I am creating a new windows service and I would like to control its Recovery
property. On a system administrator level the Recovery property is found in
Control Panel -> Administrative Tools -> Services -> Service Properties
(right click on a service) -> Recovery tab [in the ClipBook Properties
(Local Computer) dialog box] -> First failure, Second failure properties.

Would anyone know if I can (and how) control First, Second Failure property
programmatically instead of going to the Administrative tools? Or would
anyone know how to deal with this automatically when installing or starting
the windows service?

Thanks,

--
Strah @ Langan
Nov 16 '05 #1
2 8911
thanks Richard for a guideline
--
Strah @ Langan

"Richard" <Ri*****@discussions.microsoft.com> wrote in message
news:72**********************************@microsof t.com...

I don't think there is any .NET API to explicitly do this. If there is it
would be hanging off of the ServiceInstaller class and I don't see one...
BUT the recovery settings are just registry entries so in a worst case
scenario all you'll have to do is add some registry writes to your service
installer/uninstaller logic... I dunno registry keys/values offhand but if you fire up regedit and poke around a service that has non default settings you'll find them...

--Richard

"Strahimir Antoljak" wrote:
I am creating a new windows service and I would like to control its Recovery property. On a system administrator level the Recovery property is found in Control Panel -> Administrative Tools -> Services -> Service Properties
(right click on a service) -> Recovery tab [in the ClipBook Properties
(Local Computer) dialog box] -> First failure, Second failure properties.
Would anyone know if I can (and how) control First, Second Failure property programmatically instead of going to the Administrative tools? Or would
anyone know how to deal with this automatically when installing or starting the windows service?

Thanks,

--
Strah @ Langan

Nov 16 '05 #2
I found this page which may answer your question:

A ServiceInstaller Extension That Enables Recovery and Autostart Configuration
http://www.thecodeproject.com/csharp...stallerExt.asp

Mike Mazar

"Strahimir Antoljak" wrote:
thanks Richard for a guideline
--
Strah @ Langan

"Richard" <Ri*****@discussions.microsoft.com> wrote in message
news:72**********************************@microsof t.com...

I don't think there is any .NET API to explicitly do this. If there is it
would be hanging off of the ServiceInstaller class and I don't see one...
BUT the recovery settings are just registry entries so in a worst case
scenario all you'll have to do is add some registry writes to your service
installer/uninstaller logic... I dunno registry keys/values offhand but

if
you fire up regedit and poke around a service that has non default

settings
you'll find them...

--Richard

"Strahimir Antoljak" wrote:
I am creating a new windows service and I would like to control its Recovery property. On a system administrator level the Recovery property is found in Control Panel -> Administrative Tools -> Services -> Service Properties
(right click on a service) -> Recovery tab [in the ClipBook Properties
(Local Computer) dialog box] -> First failure, Second failure properties.
Would anyone know if I can (and how) control First, Second Failure property programmatically instead of going to the Administrative tools? Or would
anyone know how to deal with this automatically when installing or starting the windows service?

Thanks,

--
Strah @ Langan


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mike Mazar | last post by:
I have a service which I create in vb.net. I'm trying to use the Recovery feature of Windows 2000/XP to restart the service if it fails to start. Looks like there are some steps that a service must...
4
by: Keith | last post by:
I'm in the same boat as the fellow who posted this message back in August: Title : Windows Service, How does one make a service "fail" properly? Author : Ross Bennett Group :...
7
by: Mike | last post by:
I want to create a windows service that will monitor another window service. what i need for the service to do is, if a service is stopped I need it to start the service back up example: ...
0
by: Tal | last post by:
Hi, I am using ServiceInstaller in order to install a .Net C# service. How can i configure the service recovery mode using the installer code. I saw that ServiceInstaller contain many properties...
5
by: Geir Sanne | last post by:
hi!!! i want to make 1 windows service and be able to run like 20 independent instances of this. the main reason i want this is to be able to see the names of the processes running and to be...
1
by: Sergey Krutous | last post by:
Can you please help me to resolve the following issue: I developed a windows service. At start up (I have overriden OnStart method) it connects to a web service and if the connection fails the...
4
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... Following the samples online, we implemented a windows service in .Net. Like most services, there's a worker thread actually doing stuff in the background. The problem we've run into is...
1
by: svandanapu | last post by:
Hi All, I written one windows service and its working fine. I Need to check the recovery settings of that service from one windows application. How do I can get the recovery settings of(first...
0
by: Snofkeen | last post by:
I have created a Windows service that tracks the file system and perform actions according to received input. the service is working, though I need to set it's recovery serttings, meaning, I need to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.