hhbuesch, this gave me an idea I started coding, not script specific, just:
run_on_unlock.exe <whatever command line you want here>
and then whenever the user comes back in from a session lock, the system will run <whatever command line you want here> verbatim, as if you'd typed it in a console session.
I don't want to step on the toes of whatever project prompted your question. Do you mind if I post a program like that elsewhere on the board?