How to autorun a python script when a specific user logs on?

cokofreedom at gmail.com cokofreedom at gmail.com
Fri Feb 8 13:15:35 CET 2008


On Feb 8, 1:30 am, "jack trades" <tra... at none.com> wrote:
> "Mike Hjorleifsson" <mhjorleifs... at gmail.com> wrote in message
>
> news:c42fd745-82f0-4d73-ac56-fd1c8fb69556 at s13g2000prd.googlegroups.com...
>
> > on windows you can put this in HKEY_Local_Machine\Software\Microsoft
> > \Windows\Current Version\Run and it will run at logon (or fast user
> > switch) for each user
> > or if you only want to do it for a specific user you need to determine
> > their CSLID and put it in the same locale under the HKEY_USERS\Users
> > cslid... etc.
>
> Thanks for sparing some time.  I was looking through the registry and found
> that this works as long as you are logged in as the user you want to
> autostart the program for:
>
> def autostartProgram(name, location):
>   os.system(r'reg add HKCU\software\microsoft\windows\currentversion\run /v
> %s /t REG_SZ /d %s' % (name, location) )
>
> Jack Trades

Lets hope no one teaches these kids about run->msconfig and other such
techniques for turning these annoying things off. If the parent is
worried about their childs activites then supervise their usage, only
allow them on the system when they are nearby or present...



More information about the Python-list mailing list