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

2
Contributors
3
Replies
19
Views
5 Years
Discussion Span
Last Post by dilbert_here00
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 :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.