Thanks to sterling work by Klaas “le dahut” Tjebbes on the python-win32 list, we now have a how-do-I? example on how to keep track of session events: logon/logoff, screensaver cut-in/cut-out and shell startup: http://timgolden.me.uk/python/win32_how_do_i/track-session-events.html