[Tutor] Running scripts at login

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Tutor] Running scripts at login

Michael Lewis
Hi everyone,

I am researching how to automatically run some of my scripts after I log into my Windows machine. I don't want to have to manually run the script or setup a windows task.

I'd like to have a piece of code that I can insert into my script that will allow it to run after I login. 

I found the piece by Alan G.; however, it deals with linux and I can't seem to find a good source for Windows machine:


Thanks for the help.

--
Michael J. Lewis



_______________________________________________
Tutor maillist  -  [hidden email]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Reply | Threaded
Open this post in threaded view
|

Re: [Tutor] Running scripts at login

Alan Gauld
On 05/04/12 05:59, Michael Lewis wrote:
> Hi everyone,
>
> I am researching how to automatically run some of my scripts after I log
> into my Windows machine. I don't want to have to manually run the script
> or setup a windows task.

The same way you run any Windows program on startup:
Add the script to your startup programme group.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  [hidden email]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Reply | Threaded
Open this post in threaded view
|

Re: [Tutor] Running scripts at login

Michael Lewis
In reply to this post by Michael Lewis

On 05/04/12 05:59, Michael Lewis wrote:
> Hi everyone,
>
> I am researching how to automatically run some of my scripts after I log
> into my Windows machine. I don't want to have to manually run the script
> or setup a windows task.

The same way you run any Windows program on startup:
Add the script to your startup programme group.

What if I want to send the executable to someone and have their machine run the script at startup? Assume I don't have access to their machine to add the script to the startup program group. How can I make that happen? 

_______________________________________________
Tutor maillist  -  [hidden email]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Reply | Threaded
Open this post in threaded view
|

Re: [Tutor] Running scripts at login

Dave Angel-3
On 04/05/2012 10:07 PM, Michael Lewis wrote:

>>
>> On 05/04/12 05:59, Michael Lewis wrote:
>>> Hi everyone,
>>>
>>> I am researching how to automatically run some of my scripts after I log
>>> into my Windows machine. I don't want to have to manually run the script
>>> or setup a windows task.
>> The same way you run any Windows program on startup:
>> Add the script to your startup programme group.
>>
> What if I want to send the executable to someone and have their machine run
> the script at startup? Assume I don't have access to their machine to add
> the script to the startup program group. How can I make that happen?
>

Big difference between your original question   "... my Windows
machine..." and your present query "... access to their machine..."

This forum doesn't support system crackers.

--

DaveA

_______________________________________________
Tutor maillist  -  [hidden email]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Reply | Threaded
Open this post in threaded view
|

Re: [Tutor] Running scripts at login

Steven D'Aprano-8
In reply to this post by Michael Lewis
Michael Lewis wrote:

>>
>> On 05/04/12 05:59, Michael Lewis wrote:
>>> Hi everyone,
>>>
>>> I am researching how to automatically run some of my scripts after I log
>>> into my Windows machine. I don't want to have to manually run the script
>>> or setup a windows task.
>> The same way you run any Windows program on startup:
>> Add the script to your startup programme group.
>>
>
> What if I want to send the executable to someone and have their machine run
> the script at startup? Assume I don't have access to their machine to add
> the script to the startup program group. How can I make that happen?

You tell them to add the script to their startup program group.

If they don't know how, you give them instructions, or ask them for access so
you can do it for them, or write an installer that will do it and tell them to
run the installer. The installer could be as simple as a DOS batch file.

This has nothing to do with Python.



--
Steven
_______________________________________________
Tutor maillist  -  [hidden email]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Reply | Threaded
Open this post in threaded view
|

Re: [Tutor] Running scripts at login

Michael Lewis
In reply to this post by Dave Angel-3

>>> Hi everyone,
>>>
>>> I am researching how to automatically run some of my scripts after I log
>>> into my Windows machine. I don't want to have to manually run the script
>>> or setup a windows task.
>> The same way you run any Windows program on startup:
>> Add the script to your startup programme group.
>>
> What if I want to send the executable to someone and have their machine run
> the script at startup? Assume I don't have access to their machine to add
> the script to the startup program group. How can I make that happen?
>

Big difference between your original question   "... my Windows
machine..." and your present query "... access to their machine..."

This forum doesn't support system crackers.

Oh, definitely not my intention - I can see how it came across that way though. For full disclosure, I wrote a script to check for new / move all my girlfriends pictures to dropbox. Nothing malicious intended. 

My apologies. 

--

DaveA





_______________________________________________
Tutor maillist  -  [hidden email]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Reply | Threaded
Open this post in threaded view
|

Re: [Tutor] Running scripts at login

Alan Gauld
In reply to this post by Michael Lewis
On 06/04/12 03:07, Michael Lewis wrote:

> What if I want to send the executable to someone and have their machine
> run the script at startup? Assume I don't have access to their machine
> to add the script to the startup program group. How can I make that happen?

When you say executable in  reference to a Python script you need to be
careful about what you mean.

Because Python is an interpreted language the executable can be either
the python interpreter (python.exe) or the script that the interpreter
is executing (myscript.py).

If your friend already has Python installed on their computer (and many
nowadays do) then you just need to send the python script and ask them
to save it into their startup group (or more likely create a link to it
in their startup group) If they are non computer literate you could
write an installer or batch file that copied the file to the relevant place.

If your friend does not have Python installed you can either:
1) send them the Python installer and your script
2) get them to download and install python before running your script.
3) use a program like py2exe to bundle your script and the
    interpreter into a single self executing file

HTH
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  [hidden email]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor