Execute code after Shut Down command given --- How?

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Sep 22 07:07:31 EDT 2011


Virgil Stokes wrote:

> I would like to execute some Python code (popup message to be displayed)
> when
> Windows Vista/7 is shut down. That is, this code should execute after 
> "Shut Down" is given from the "Shut Down Windows" popup, but before the
> actual shut down sequence starts.
> 
> How to write Python code to accomplish this task?


Exactly the same way you would write it in any other language.

This is not a Python question. It is a Windows question: "How do I execute
code after the user calls Shut Down Windows, but before the shut down
sequence starts?" Find out how to do that, and then do it using Python
instead of another language.



-- 
Steven




More information about the Python-list mailing list