How to detect windows shutdown



I wrote a program running on windows.
I put the link of the program in "Start up" folder and let it executed
minimized.
Every time when I open the computer, my program will be running in system
tray.

But if the user would like to shutdown the computer, the OS will show an
error about exception.

At first, I think windows will terminate all processes when it shutdown.
So, if python has the way to dectect shutdown process, I can kill the
process in advance.

Thanks a lot.


.



Relevant Pages

  • Re: delete recent folder adminition
    ... Ramesh, Windows XP MVP ... an information message box that states, "Recent is a windows system folder and is required to run Windows properly. ... To find out what program or process is trying to delete the recent folder on shutdown. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: How to detect windows shutdown
    ... for being turned into Windows Services. ... shutdown commands properly and can be fine-grained scheduled ... For tutorial pick of a copy of Python Programming ... > I wrote a program running on windows. ...
    (comp.lang.python)
  • Re: How to delete a folder
    ... the quotes) where is the name of the folder you want to delete. ... Rick Rogers aka "Nutcase" MS-MVP - Windows ... Another possible cause for the problem: a program running in ... >> "How to Perform Disk Error Checking in Windows XP" ...
    (microsoft.public.windowsxp.basics)
  • Is there a way to do a shutdown routine?
    ... in the "Shutdown" folder, then finish shutting down windows. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re - Unwanted Startup
    ... Could be folder options are set to remember what windows ... folders were open at shutdown or somehow thinks it was ...
    (microsoft.public.windowsxp.perform_maintain)