Restricting Non-Admin Users From Stopping a Process in Task Manager C++
In C++ and using the WinAPI; I am trying to start a process with admin rights using CreateProcessWithLogonW(), from within another application that does not have admin rights, but the new process can be stopped from within task manager by the non-admin user.
Any help would be greatly appreciated.
Chaman
As I can remember, Create admin process from non-admin process is very hard in windows. The simplest option to start admin process is to build that process exe with admin privilege, and use ::ShellExecute.
In vista and win7, posting message to admin process from non-admin process is not allowed. you may need to create your own message queue to send msg to admin process in order to kill it. (boost message queue can be one option). Or you can use some other sync techniques to kill it.
精彩评论