开发者

What's the Win32 API to disable task manager completely? [closed]

Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 10 years ago.

Improve this question

That is,even if you press Ctrl+Alt+Del,the task manager should no开发者_如何学Ct pop up.


You can disable access to the task manager using the group policy editor or the The Group Policy API.

To use the editor, run gpedit.msc and navigate to Navigate to "User Configuration" -> "Administrative Templates" -> "System" -> "Ctrl+Alt+Del Options". Double-click the "Remove Task Manager" setting and set it to "Enabled".

Close the policy editor then run the command gpupdate /force to apply the changes.

After you've done this, if the user tries to access the task manager then they'll get a message saying that access is disabled.

EDIT

If the user is an administrator then they could (if they know how to) go into gpedit and re-enable the taskmanager. To avoid this make them a member of the Users or Guests groups: they won't be able to change the any policy settings then.


While a user can go in and turn it on again, you can set this registry key to 1

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskmgr

(the \System\ and DisableTaskmgr might not exists so create them, DisableTaskmgr should be a DWORD32 key)


You should normally not need to do that, and regardless, you should not do it anyway, even if think you need it. There are good reasons why the user is allowed to do things like tabbing out or killing processes with the task manager. Interfering with the system in such a fundamental way is usually frowned upon, for good reason. Even more so as there is really no valid reason why you'd need that, normally.

Anyway, there is no way to directly disable launching Taskmanager, but there are at least 3 indirect ways of doing this:

  1. Install a global low-level keyboard hook and discard the Ctrl-Alt-Del keypress (this may not work on some versions of Windows, and if the user is running antivirus software, it will trigger an alert)
  2. Install your own no-action Taskmanager (ProcessExplorer does that, so it ought to work)
  3. Remove "read-execute" permission from the taskmanager executable (this works confirmedly, I've done that by accident once)

Obviously, all three "solutions" are super intrusive and have a super malicious character, so you should really think 10 times before doing any such thing. And if you do, don't complain if you break your system.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜