Programmatically Changing Service Attributes.

Posted on 2009-02-12
Last Modified: 2012-05-06
Dear Experts,

We have written a service-based VB.Net program that installs a service to Windows Services. However, while installing the service we want that the program changes Recovery attributes of the service other then default provided by Windows.

Such as:
First Failure: Restart Service
Second Failure: Restart Service
Subsequent Failures: Restart the Service.
Reset Fail Count After: 0 Days
Restart Service After: 0 Minutes

Thanks in advance.

Question by:GurcanK
    LVL 6

    Accepted Solution

    LVL 19

    Assisted Solution

    LVL 19

    Expert Comment

    Ooops sorry Mushq - your post wasn't there when I posted!
    LVL 6

    Expert Comment

    Hi daveamour I am very happy to see that your answer has been graded too. :)

    LVL 19

    Expert Comment

    Cheers :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    Title # Comments Views Activity
    C# ConsolApp opens new window 16 43
    network + 7 57
    Cannot submit form in ASP.NET MVC 3 47
    Parse CSS value with RegEx 2 28
    Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now