How to run a python script at windows startup?

 
1
 

Hello ALL,

I was wondering if there is a way to run a python program at windows startup, without running the script as a windows service?

I have a python program which runs a bunch of functions & then sometimes restarts the computer. At startup I want my script to run automatically till all the functions are executed.

Is there an easy way to implement this? Thanks in advance for your help.

Regards

Featured Replies in this Discussion

  • If .py files are assigned to be opened by python on your system, then you only need to put a shortcut into your startup folder. C:\Documents and Settings\All Users\Start Menu\Programs\Startup More andvance solutions is. - add it to the windows registry (HKCU\Software\Microsoft\Windows\CurrentVersion\Run) - package it into a service, that should then be installed
 
3
 

If .py files are assigned to be opened by python on your system, then you only need to put a shortcut into your startup folder.
C:\Documents and Settings\All Users\Start Menu\Programs\Startup

More andvance solutions is.
- add it to the windows registry (HKCU\Software\Microsoft\Windows\CurrentVersion\Run)
- package it into a service, that should then be installed

 
0
 

If .py files are assigned to be opened by python on your system, then you only need to put a shortcut into your startup folder.
C:\Documents and Settings\All Users\Start Menu\Programs\Startup

More andvance solutions is.
- add it to the windows registry (HKCU\Software\Microsoft\Windows\CurrentVersion\Run)
- package it into a service, that should then be installed

Hi Snippsat,

Thank you for your response. I am using win 7, & I tried adding an entry to "HKLM/SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" with my python script, but i keep getting Error 5. Access is denied. I verified i have adequate permissions, & I am manually able to change the key. Any idea why this is happening?

Thanks & Regards

 
0
 

Hi Snippsat,

Thank you for your response. I am using win 7, & I tried adding an entry to "HKLM/SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" with my python script, but i keep getting Error 5. Access is denied. I verified i have adequate permissions, & I am manually able to change the key. Any idea why this is happening?

Thanks & Regards

Hey it worked i just had to right click & run my script as administrator.

Thanks :)

Question Answered as of 3 Years Ago by snippsat
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article