Ignition Client Side Application Auto Logout Issue

Hi Team,
Is there any auto logout feature or any code available to prevent application from shutdown accidently due to power failure or if user close application directly .
We tried with client side shutdown-intercept event for handling this but not working.
Our purpose is ,If application closed accidently then we need application to be shutdown in a proper way as per our script.

Thank you,

You can remove client exit options in Project Properties, and Client Event Scripts->MenuBar. The shutdown-intercept event cannot be used if the client is force closed like ctrl + alt + delete, or power loss. You could add a UPS (uninterruptable power supply) to the hardware running the client to help prevent power loss events. Depending on the nature of a safe shutdown sequence, you should consider writing a gateway timer script to check for the client status via system.util.getSessionInfo then execute some logic when the client session is ended.