c# - 从 TaskManager 隐藏 Windows 应用程序进程

标签 c# winforms taskmanager

我正在创建一个需要密码才能退出的应用程序。

所以我禁用了关闭按钮并从任务栏中删除。

我还可以从 TaskManager 应用程序选项卡中删除。但是当我在 TaskManagers Processes 选项卡中搜索时,它在其中可见并且我能够结束进程从而从那里结束应用程序。所以我什至需要从那里隐藏流程。

你能帮我做这件事吗??

最佳答案

看这个题目: How can I keep Task Manager from killing my program? 有人要求同样的事情。

最佳答案:

AV Programs like Kaspersky probably use a driver and use hook to prevent termination. In your situation I would advise to set an ACL on the process, this prevents termination with Task Manager or cmdline tools (if the user does not have the Debug privilege). Of course the user can always use a tool like Process Explorer, take ownership of the process, set new ACL and Terminate.

If the user is not an administrator it would suffice to run the process in a different user context (eg launch it from a service).

这里有一些关于msdn的信息: http://msdn.microsoft.com/en-us/library/windows/desktop/ms684880(v=vs.85).aspx

关于c# - 从 TaskManager 隐藏 Windows 应用程序进程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13468053/

相关文章:

c# - 使用 System.Diagnostics.Process() 为进程设置图像名称和描述

c++ - 如何向我的程序添加描述(-> 任务管理器中的描述列)(VS 2008,C++)

c# - 使用正则表达式匹配字符串 c#

c# - HttpWebRequest 中图像的最大允许大小是多少?

c# - .NET 4.0 项目如何引用使用 v2.0.50727 运行时的程序集?

Winforms TabControl 导致 UserControl 的虚假 Paint 事件

c# - WPF 任务管理器 : Handling Refreshing CPU Load Value?

c# - 类型 'Api.Controllers.' 没有默认构造函数

c# - 上传文件不起作用 - 需要帮助

c# - ThreadPool 设置是全局设置还是仅针对工作项?