Windows Prevent A Process From Being Terminated

How do I prevent a process from being terminated by an administrator using c++? What I want to know is this: how do I create a c++ program to prevent a specific process from being ended? NOTE: The c++ program can start the process that cant be stopped. You CAN NOT say that is not possible because I have an example for you right here: when I open up task manager as administrator (i.e show processes from all users if you don't know what administrator means), I cannot end the my virus protection process.
Might be of interest?

It is possible to end any process even though it is a service or a system process by previously enabling the debug privilege. This privilege is assigned to Administrators and is disabled in the access token. While Task Manager does not make use of the debug privilege, the KILL utility does.

Cannot End Service Processes with Task Manager
https://support.microsoft.com/en-us/kb/155075

Andy

PS the only exception to this rule is the system process csrss.exe which is protected by the system.
Last edited on
Topic archived. No new replies allowed.