Hi, I probably have a tricky question here. I'd like to know if there's a way in python to detect (maybe using an infinite loop in a script run in background) if windows is shutting down, does anyone know how to do this?
I read the post you linked, but I don't need to interrupt shutdown process, I essentially want to execute a script when the shutdown button is pressed (not the physical one) and make sure that it execute correctly.
Quote:I'd like to know if there's a way in python to detect (maybe using an infinite loop in a script run in background) if windows is shutting dow
The first reply explains on URL I provided: 'how to intercept the shutdown command.'
you don't have to use the code verbatim, just use the 'Detect' part!!!