在任务管理器VBNET中防止结束进程 [英] Preventing End Process in Task Manager VBNET

查看:468
本文介绍了在任务管理器VBNET中防止结束进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下午好,



i正在开发一个'无形'应用程序,该应用程序将在后台运行并在当前用户下登录运行,这一切都正常工作正常。



但是,我要求程序在后台运行,因为它是一个监控任务,除了退出/关闭等任何环境之外不应该关闭。



我知道在Windows窗体应用程序中你可以处理'Form Closing'事件并取消它但是这不能使用结束进程。我希望能够阻止用户点击结束进程,例如拒绝访问消息等



如果我可以运行它,这不会是一个问题作为系统,但它特别需要以用户身份运行。



任何想法和方向都将不胜感激。



开发。

Good Afternoon,

i am developing a 'Formless' application that will run in the background and run on logon under the current user which is all working fine as expected.

However, i require the program to run in the background as it is a monitoring task that shouldnt be closed under any circustances other than Logging off / Shutting down etc.

I know in a windows form application you can handle the 'Form Closing' event and cancel it but this doesnt work using end process. i want to be able to prevent the user from clicking 'End Process' such as an 'Access Denied' message etc

This wouldnt be a problem if i could run it as system but it specifically needs to run as the user.

Any thoughts and direction would be greatly appreciated.

Dev.

推荐答案

一个想法:



你必须创建两个互相监视的进程。

当一个进程检测到它的对手没有再运行时它应该再次启动它。



但是仍有一种方法可以通过使用SysInternals Process Explorer来终止这些进程。

你暂停其中一个进程,以便它不再能够监视它的对手

那么你可以杀死它们。
One idea:

You must create two processes that watch each other.
When one process detects that its counterpart is not running any more
the it should start it again.

But there is still a way to kill these processes by using SysInternals Process Explorer.
You suspend one of the two processes so that it cannot watch any more its counterpart
an then you can kill them both.


这篇关于在任务管理器VBNET中防止结束进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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