Is there the possibilty that I can know with Python when a user clicks on shutdown / runs the shutdown.exe in Windows so I can safely terminate a program before the shutdown happens? And by terminating safely I mean storing current values of another application so the user doesn't lose them. I guess when the user runs the shutdown process a new process will get registrated in the kernel so I thought maybe I could see through the SetWindowsHookEx
function if there is a new "shutdown-process"? Is this the only way? And I'm also not really sure, if this is even possible.
Asked
Active
Viewed 113 times
0

P̲̳x͓L̳
- 3,615
- 3
- 29
- 37
-
Proper way is WM_QUERYENDSESSION/WM_ENDSESSION in Win32. – Xearinox Mar 15 '14 at 22:20
-
I believe you want to do the same as this post? http://stackoverflow.com/questions/1411186/python-windows-shutdown-events – Avatar33 Mar 15 '14 at 22:46