http://www.perlmonks.org?node_id=1073313


in reply to How to continue the execution of a perl script if the user session gets locked while running it.

That's one of the gotcha's about Windows that I ran into. I don't know all of the technical stuff, but here's some things that I learned a few years ago from trying to automate a GUI program (with and without Perl).

The above may not be 100% accurate, but that's what I remember encountering in my attempts at automating GUI programs from a few years ago. Also, in the scenarios above where I said the "GUI goes away", any programs that were running continue to run. Windows just isn't using a GUI environment until the user is logged back in and actively using the desktop.