Currently i am developing a small utility in java. This utility needs to perform certain operations if the user attempts to lock the windows PC. How can i check whether a windows lock action is performed by user?
Asked
Active
Viewed 249 times
0
-
You can trigger a scheduled task on lock/unlock https://stackoverflow.com/questions/1830666/run-command-script-when-lock-unlock-windows-station – David Conrad May 17 '18 at 06:00
1 Answers
0
You will have to use something like JNA and call the Window APIs.
In this question they discuss the windows events that are responsible for telling when the user locked the computer.

Daniel Pereira
- 2,720
- 2
- 28
- 40
-
What I want to do is, catch the event of window lock & display a dialog. Windows should not be locked until the "OK" on the dialog is not pressed. – Shobhit Tyagi May 17 '18 at 08:34