我的过程在不知情的情况下不应该被杀死 [英] My process should not get killed without knowing passord

查看:57
本文介绍了我的过程在不知情的情况下不应该被杀死的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是C ++/VC ++开发人员.我已经在Windows启动中启动了一个进程.我希望该进程不应使用任务管理器或任何此类应用程序杀死.我应该如何去做.

如果可能,请不要建议设备驱动程序编程.

预先感谢

解决方案

我相信一种常见的方法是使用看门狗"进程来监视主进程,并在主进程终止时重新启动它.然后,当然,主要过程必须监视看门狗.

不是防弹的,但够烦人的. > -如果进程终止,则可以使用JOB_OBJECT_MSG_EXIT_PROCESS.
-通过处理上述消息,可以通过调用CreateProcess()或spawn()重新启动终止的进程.用户帐户(相对于操作系统)而言,您将无法做到这一点(听起来很怀疑).

您的应用程序(相对于用户)具有与其他所有应用程序完全相同的权限,并且不包括更改针对计算机(属于用户而不是您)或用户的OS行为的权利他本人(他拥有使用他所付费的操作系统的所有功能的许可证,而不是您)

当然,您可以实现一些技巧,例如制作另一个进程来控制第一个进程,并在死机时重新启动它.但是用户可以自己阻止它们.

如果您拥有计算机(它们属于您和您的用户也属于同一组织),那么干净的解决方案是运行在系统级别(实际上是服务)下运行的进程,该进程在管理帐户(理想情况下是特定帐户)下运行一个)与用户不同,它具有在用户模仿下启动进程的权限.

换句话说,您在组织中创建了一个有权控制用户运行过程的用户".


Hi,

I am C++/VC++ developer. I have launch one process in windows start up. I want that process should not get killed using task manager or any such application. How should I go for this.

If possible,please do not suggest device driver programming.

Thanks in advance

解决方案

I believe a common approach is to use a "watchdog" process that monitors the main process and re-starts it if it is terminated. Then of course the main process must monitor the watchdog.

Not bullet proof but annoying enough.


- Windows has Job Kernel Object which can be used to monitor activities of processes, even it can be used to monitor the process which created it.
- JOB_OBJECT_MSG_EXIT_PROCESS can be used to if the process gets terminated.
- By handling the above message the terminated process can be restarted by calling CreateProcess() or spawn().


If you are operating at the "USER LEVEL" (your process is running under the user account, respect to the OS) then you cannot do that (and it sounds very suspicions doing that).

You application, respect to the user, has exactly the same rights every other application has, and don''t include the right to change the OS behavior respect to the computer (that belongs to the user, not to you) or to the user himself (he has the licence to use all the features of the OS he payed for, not you)

Of course you can implement some tricks like making another process to control the first and restart it if dead. But the user can himself stop them both.

If you own the computers (in the same that they belong to a same organization you and your users also belongs) the clean solution is to operate a process running at system level (in practice a service) running under an administrative account (ideally a specific one) distinct from the user one, that has the grant to start process under user impersonation.

In other words, you create in your organization a "user" that has the power to control the user''s running process.


这篇关于我的过程在不知情的情况下不应该被杀死的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆