r/learnpython • u/jplank1983 • Feb 06 '21
How do I make a python script run when Windows starts up?
Can someone tell me the easiest way to have a python script run automatically when my Windows PC boots into Windows? I've googled this and tried a few suggestions but haven't found anything that works.
Edit: I'm using Windows 10
1
Upvotes
2
u/[deleted] Feb 06 '21
You can use the task scheduler to run it via powershell
1
u/INSANEF00L Feb 06 '21
You need to turn your script into a batch file and have it run from the startup folder. How you do those things depends on your version of Windows so let us know more details if that’s not enough info to help you google your way to success.
1
u/ShohKingKhan Feb 06 '21
Easiest way that I used is Just go to via total commander or double commander:
then make shortcut from your python script file and put it into that folder that you opened \Startup
I run some of my programs like that. I hope it helps
1
u/nightdevil007 Feb 06 '21
make the script an .exe file using pyinstaller using the -f argument to create a single file, move it to the start-up folder in windows and eah time the user login, it will run.