防止Windows应用程序(VB.Net)终止 [英] Prevent Windows Application (VB.Net)Termination

查看:68
本文介绍了防止Windows应用程序(VB.Net)终止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要阻止或限制VB.Net应用程序的终止.管理员杀死应用程序没有问题,但用户没有问题.我一直无法为此提出解决方案.甚至有办法设置本地策略来防止非管理员终止?

I have the need to either prevent, or restrict, the termination of a VB.Net application. I have no problem with Admin killing the application, but not a user. I've been unable to come up with a solution for this. Is there maybe even a way to set local policy to prevent termination by non-admin?

注意:假设这是出于恶意目的,我以前已经问过这个问题,人们问为什么".这是一个GUI应用程序,每个策略必须保留在用户窗口的顶部.

Note: I've seen this question asked before and people ask "why", assuming this is for a malicious purposes. This is a GUI app that MUST remain on top of the users windows per policy.

更新:我知道这是有可能的...我看到过一些应用程序,当我尝试通过任务管理器终止它们时,我获得了拒绝的权限.那就是我想要做的...

Update: I know this is possible SOMEHOW... I have seen applications that, when I try to terminate them through the task manager, I get a permission denied. That's what I'm trying to do...

推荐答案

如果您处理闭包事件并说e.cancel(如果它是普通用户),那么它将在您的边界内处理.但是,除非并且除非Windows中存在物理限制,否则您无法执行策略.我认为,如果您可以删除.NET关键字并将问题发送给IT特定人员,则将有所帮助.在.NET中,您可以执行除初始声明中所述之外的其他操作.

If you handle formclosing event and say e.cancel if it is a normal user then it will be handled in your boundary. But you cannot enforce policy until and unless there is physical restriction applies in windows. I feel if you can remove the .NET keyword and put the question to IT specific guys it will help. In .NET you can do other than what I have explained in the initial statement.

这篇关于防止Windows应用程序(VB.Net)终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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