locked
Reg : Help for Windows service RRS feed

  • Question

  • Hi

     I want to write the code to restart the windows service with in the same serice. please help me

    Thanks in advance.
    vinoth kumar
    Tuesday, February 24, 2009 12:27 PM

Answers

  • AFAIK you cannot restart a service from the same service. You will require some other mechanism to stop/start your service.

    When your actual service stops the code execution also stops. So there will not any trigger/call to start the service.

    To actually restart a service from another app/service take a look at this link.
     http://www.csharp-examples.net/restart-windows-service/

    Regards,
    Navin Narayan
    • Marked as answer by Bin-ze Zhao Thursday, February 26, 2009 6:05 AM
    Tuesday, February 24, 2009 12:41 PM