Disable the Ctrl-Alt-Delete event through Java program

隐身守侯 提交于 2019-12-01 18:09:22

Fact is Alt+Ctrl+Del never actually entering your application. Os traps Alt+Ctrl+Del before it is send to your application. So you can't trap it.

sabbour

Alt+Ctrl+Del cannot be overridden. It is a security feature.

Itay Maman

You cannot do that. The behavior of Alt+Ctrl+Del is enforced by the operating system, for good reasons: it makes sure that you can always bail-out of a faulty application.

http://www.codeproject.com/KB/winsdk/AntonioWinLock.aspx

lists several possibilities, from disabling the taskmanager to injecting keyboard hooks. But I doubt there's some built-in java functionality for that.

You can disable the task manager by setting alwaysOnTop to true and when they signout have your program cancel the signout. However, there is nothing against powering off your machine.

What I have done is add a temporary file to the startup folder and then using a forced sign out when they hit they hit control ALT delete in a shutdown hook. Also, I would set the GUI to alwaysOnTop. However, when they log back in make sure you delete the temp running file. This, way if they sign out and cancel it, they will not be able to, and the program will still run.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!