On Tue, Apr 9, 2013 at 12:35 PM, Dave Angel <da...@davea.name> wrote: > But does anything in the startup folder run BEFORE any user logs in? It's > been a long time since I had to run Windows, but I didn't think so.
The contents of the startup folders are executed in the current session after logon. The same applies to run keys such as "HKLM\Software\Microsoft\Windows\CurrentVersion\Run". I wasn't taking "startup" to mean literally before any user has logged on. But yes, if that's the requirement, you can use the Task Scheduler service to start a program as a batch process in session 0 (or instead create your own service). Just as an FYI, in the "Home" versions of Windows the task scheduler can't store logon credentials, so to run at startup you have to use LOCALSERVICE or SYSTEM. To automate creating a task use the "schtasks" command. For example, to create a task named "Python" that runs python.exe at startup under the LOCALSERVICE account, execute the following from an elevated shell: schtasks /Create /TN Python /RU LOCALSERVICE /SC ONSTART /TR C:\Python33\python.exe This will run as a non-interactive service in session 0. There won't be a visible GUI or console window to interact with in your desktop session. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor