how to create a process which is not visible in task manager or services list [duplicate]
Possible Duplicate:
Hide a C# program from the task manager?
I need to create an enterprise level activity monitor process in which the user should not be able to kill using the Task Manager or some other method. Perhaps it should be a hidden process. Is this possible? Are there any workarounds? I prefer to use C#
then C++
(with the Visual C++ compiler).
Thanks SO
Related:
Hide a C# program from the task manager?
https://stackoverflow.com/questions/759466/is-it-possible-to-hide-console-c-application-from-task-manager
Short answer is: no, you can't (legally) hide it from Task manager, unless you wrap it with a Windows service. There are various ways of preventing your application from closing.
On the topic of "how do i prevent users from doing X", the answer is security. If you want users to have full access to their machines, then you can't restrict them. If you want to restrict users, then change your security policy accordingly.
"But then my employees won't like the idea that we don't trust them with full admin rights" - well, honestly, you don't trust them; that's why you are implementing this. You don't want employees tricking you, and they should expect the same of you.
In addition to what others say, One more simple solution is to just create two processes - one REAL process, and one "sentinel". Basically, every 100ms or so, just do a quick check to see that the other process is alive and healthy, and if it's not, launch it. It's easy to get around this (by using kill.exe
for example), but so is every other solution considering your users are full administrators.
The legitimate solution to really prevent them from killing your app is to restrict access via typical Windows security -- restrict user access to the process. Not by cheap hiding and obfuscation.
精彩评论