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

V

Virgil Stokes

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?
 
S

Steven D'Aprano

Virgil said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,060
Latest member
BuyKetozenseACV

Latest Threads

Top