none
Protect service from closing through the Terminate Process RRS feed

  • Question

  • Hello.

    I have a .net windows application that runs as a service on the local system.
    I need to protect the service from closing, just like Kaspersky Anti-Virus did it:
    it is immposible to close from services snap-in, so as it ignores all attemps to be killed as a process in task manager.

    It is easy to disable the Stop service button by setting the CanClose property to false; But what about the process termination?

    Kaspersky, probably, just catches all the task terminate events and if it is directed toward himself, he cancels it. Any tip on how to make it possible in .net are really appreciated.

    Thanks in advance,

    Max Pavlov.

    Max Pavlov
    Thursday, July 24, 2008 5:36 PM

Answers

  • We cannot discuss techniques to create unkillable processes on a public Microsoft forum.  I'm sure you understand why.
    Hans Passant.
    • Marked as answer by Zhi-Xin Ye Wednesday, July 30, 2008 9:32 AM
    Thursday, July 24, 2008 7:04 PM
    Moderator

All replies

  • We cannot discuss techniques to create unkillable processes on a public Microsoft forum.  I'm sure you understand why.
    Hans Passant.
    • Marked as answer by Zhi-Xin Ye Wednesday, July 30, 2008 9:32 AM
    Thursday, July 24, 2008 7:04 PM
    Moderator
  • Oh, that's right. I didn't think about it. I am a developer for the company that is creating an enterprise application to facilitate the IT-Infrastructure, something like Microsoft System Operations Manager. And I decided that it would be nice to make a process unkillable so that the serviced workstation would remain under control for as long as it is possible.

    Still in most cases, the process will not get killed by some other app or users, so I may just leave it with Stop button disabled.

    Thanks anyway.

    Max Pavlov
    Friday, July 25, 2008 8:55 AM