To detect logoff
95462
C# - How to detect a Windows shutdown/logoff and cancel that action (after asking the user)
58686
Logging out of Stack Overflow or any Stack Exchange site?
153189
Windows 7 - How to run a script at shutdown but not at logoff
79350
apex method for logout from force.com site
783
Why does logging out log you out EVERYWHERE?
155682
How to check if a shell is login/interactive/batch
112884
How to see the details which Ubuntu shows at the time of login anytime?
154113
Detecting and restarting my crashed .NET application
9028
Detecting headphone connection/disconnection in Linux
130938
Java: Handle logoff or shutdown on Windows and Linux
136575
Problem with logging out
71013
How to detect the cause of what causes Windows Explorer to crash?
7519
Detect the Internet connection is offline?
24667
Which log will tell me why my computer shut down?
91550
How do I detect keystroke loggers in a reliable way?
7624
Detect if program is running with full administrator rights
11878
Identifying Between Refresh And Close Browser Actions