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.
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.