防止用户停止进程 [英] Prevent users from stopping a process

查看:58
本文介绍了防止用户停止进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

长话短说,我需要创建一个用于监视计算机音量的应用程序.计算机的用户无论如何都不能停止该应用程序.

Long story short, I need to create an application that monitor the sound volume on a computer. The computer's user must not be able to stop the application no matter what.

我需要使我的应用程序在计算机启动时启动,因此用户不能在没有运行应用程序的情况下重新启动它以进入自己的会话.到目前为止,我还不知道该怎么做,但是通过一些研究,这应该不会成为问题.

I'll need to make my app start on computer start up, so the user can't just restart it to enter his session without the application running. As of now I don't know precisely how to do it but with some research this shouldn't be a problem.

我最大的担心是,他是否只是在任务管理器中停止了该过程.我想我无法以编程方式避免这种情况?有没有一种方法可以只修改会话的权限,以便它不能停止任务管理器中的进程?还是我没有想到的其他解决方案?

My biggest concern is if he just stops the process in the task manager. I guess that I can't avoid that programmatically ? Is there a way to just modify the session's right so that it can't stop processes in the task manager? Or any other solution I didn't think about ?

还是没有办法做到这一点,我只需要相信我的用户就不要在任务管理器中停止程序了?

Or there is no way I can do that and I'll just have to trust my user not to ever stop the program in the task manager ?

在此先感谢您的帮助.:)

Thanks in advance for your help. :)

PS:它将在学生俱乐部的计算机上运行,​​该计算机运行俱乐部的音乐,任何人都可以访问.有一些房间供人们在上面的地板上睡觉,所以我们不希望人们将音量调得太大.而已.没有恶意软件或任何东西.

PS : This will run on a computer in a student club that runs the music for the club and that anyone can access. There are chambers where people sleep the floors above so we don't want people to put the volume too loud. That's it. No malware or anything.

推荐答案

通常,只有这样的程序才是恶意程序(例如 rootkits ).如果您考虑一下,您真的不会想要程序能够那样做.

In general, the only programs that act like that are malicious (e.g. rootkits). If you think about it, you really wouldn't want programs to be able to act like that.

正如其他人指出的那样,您在这里获得的最接近的服务是Windows服务,它将自动从Windows启动.一般用户不知道要停止它,但是对于高级用户仍然可以手动停止它.

As others have indicated, the closest you'll get here is a Windows Service, which automatically starts with Windows. Average users won't know to stop it, but it's still possible to stop it manually for power users.

您可以尝试的一种解决方法是定期让它调用Web服务以验证其是否正在运行.这样,您就可以知道谁可能卸载或停止了该服务.(当然,问题在于他们可能只是没有打开计算机或什么东西;您可能需要分别调用开始"和保持打开".)

One work-around you could try is to periodically have it call a web service to verify that it's running. That way you could tell who might have uninstalled or stopped the service. (The problem, of course, is that they might just not have their computer on or something; you could have separate calls for "Start" and "Still On").

或者,如果仅将它安装在完全由您直接控制的计算机上(如其他人所指出的那样),则可以进行配置,以便需要管理访问权限才能停止该过程.该选项已在评论中得到解决.

Alternatively, if this installed only on computers that are exclusively under your direct control, as others have indicated, you could configure things so that you need administrative access to stop the process. This option was addressed in the comments.

这篇关于防止用户停止进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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