How to determine if a Python script is being run right after startup on Windows

Steven D'Aprano steve-REMOVE-THIS at cybersource.com.au
Tue Sep 7 07:57:30 CEST 2010


On Mon, 06 Sep 2010 22:19:46 -0700, Ryan George wrote:

> My question is this: is there any way I can determine if the program is
> being run directly after a startup on a Windows machine?

How would you, a human being, determine if the program was being run 
directly after startup?

What counts as "directly"? Within 10 seconds? Before any other program 
with a GUI? Before *any* other program, including background processes? 
Before the Windows desktop loads?

You also said:

"What I'm looking to do is have it start up with Windows and
automatically swap the wallpapers. This part I have already coded, and
as far as I know, it should work."

As far as you know, it SHOULD work? How about trying it and finding out?

In any case, it sounds to me that what you need is two programs, one 
which automatically sets the wallpaper at startup, and a second that is a 
GUI.


-- 
Steven



More information about the Python-list mailing list