Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to not allowing the user to kill a process from Task Manager

How to not allowing the user to kill a process from Task Manager

Scheduled Pinned Locked Moved C#
tutorialhelp
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aseem Sharma
    wrote on last edited by
    #1

    Hi friends, I am developing a Parental Control application. I want that no body could kill this application from Task-Manager. Even administrator should not be allowed to kill this process from Task-Manager. The only way to close the application should be that user click its CLOSE button, he will be then asked to enter his password, and if he enters correct password, application would get closed. The behavior should be similar to when user try to kill an anti-virus. For example when I try to kill the anti-virus Kaspersky, I get below error message:

    _**---------------------------
    Unable to Terminate Process

    The operation could not be completed.

    Access is denied.**_

    I also want similar behavior. Please let me know, how to do that. Thanks in advance

    D M P 3 Replies Last reply
    0
    • A Aseem Sharma

      Hi friends, I am developing a Parental Control application. I want that no body could kill this application from Task-Manager. Even administrator should not be allowed to kill this process from Task-Manager. The only way to close the application should be that user click its CLOSE button, he will be then asked to enter his password, and if he enters correct password, application would get closed. The behavior should be similar to when user try to kill an anti-virus. For example when I try to kill the anti-virus Kaspersky, I get below error message:

      _**---------------------------
      Unable to Terminate Process

      The operation could not be completed.

      Access is denied.**_

      I also want similar behavior. Please let me know, how to do that. Thanks in advance

      D Offline
      D Offline
      Dan Mos
      wrote on last edited by
      #2

      If a user has full admin rights they can take down/kill any process. At Karpersky it is a windows service that must be shut down(stoped) before ending the process(es). [edit to add] If the computer(s) are on a domain with active directory then it would be really simple to block even the local admins.

      All the best, Dan

      modified on Sunday, January 16, 2011 12:55 PM

      1 Reply Last reply
      0
      • A Aseem Sharma

        Hi friends, I am developing a Parental Control application. I want that no body could kill this application from Task-Manager. Even administrator should not be allowed to kill this process from Task-Manager. The only way to close the application should be that user click its CLOSE button, he will be then asked to enter his password, and if he enters correct password, application would get closed. The behavior should be similar to when user try to kill an anti-virus. For example when I try to kill the anti-virus Kaspersky, I get below error message:

        _**---------------------------
        Unable to Terminate Process

        The operation could not be completed.

        Access is denied.**_

        I also want similar behavior. Please let me know, how to do that. Thanks in advance

        M Offline
        M Offline
        Manfred Rudolf Bihy
        wrote on last edited by
        #3

        By hooking into TerminateProcess or NtTerminateProcess you can achieve what you're looking for. I seriously doubt though that having a .NET C# function as a hook function is a.) advisable and/or b.) a feasable thing. If you want to invest some time/work to get going in C++ this CP articel might come in handy: Easy way to set up global API hooks[^] Regards

        1 Reply Last reply
        0
        • A Aseem Sharma

          Hi friends, I am developing a Parental Control application. I want that no body could kill this application from Task-Manager. Even administrator should not be allowed to kill this process from Task-Manager. The only way to close the application should be that user click its CLOSE button, he will be then asked to enter his password, and if he enters correct password, application would get closed. The behavior should be similar to when user try to kill an anti-virus. For example when I try to kill the anti-virus Kaspersky, I get below error message:

          _**---------------------------
          Unable to Terminate Process

          The operation could not be completed.

          Access is denied.**_

          I also want similar behavior. Please let me know, how to do that. Thanks in advance

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          This question comes up regularly in one form or another in this forum. While I appreciate that you have a legitimate reason for wanting to do this, you have to appreciate that we are averse to posting information that will let any old script kiddy create a malware application that can't be terminated. Sorry.

          I'm not a stalker, I just know things. Oh by the way, you're out of milk.

          Forgive your enemies - it messes with their heads

          My blog | My articles | MoXAML PowerToys | Onyx

          F 1 Reply Last reply
          0
          • P Pete OHanlon

            This question comes up regularly in one form or another in this forum. While I appreciate that you have a legitimate reason for wanting to do this, you have to appreciate that we are averse to posting information that will let any old script kiddy create a malware application that can't be terminated. Sorry.

            I'm not a stalker, I just know things. Oh by the way, you're out of milk.

            Forgive your enemies - it messes with their heads

            My blog | My articles | MoXAML PowerToys | Onyx

            F Offline
            F Offline
            fjdiewornncalwe
            wrote on last edited by
            #5

            Well said. Exactly what I was thinking, but you reflect it in a much more polite manner. :)

            I wasn't, now I am, then I won't be anymore.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups