SoFunction
Updated on 2024-12-19

Implementation of python scripts to boot up the computer.

Problem description: set python script to boot self-start.

Environment: windows 7 64 bit

some time ago, have been trying to package files into exe files, and then set to boot up, although the feeling is very pretentious, but the use of pyinstaller packaged into exe files of the course is very bumpy, a change in the script or import a new library, packaged with a variety of errors, a variety of problems, and finally the blogger can not find a solution to give up after the final blogger, who knows that all of a sudden, but to see a blog! that can directly set the py program into the boot startup, really happy, the following instructions for the procedure:

(1) First, you need to create a new .bat file (to run the script) with the following format, the red part is the location of the python script (save it after writing):

python f:\project_cx\wanggong\

pause

(2) Click Start - All Programs - Startup - Right Click - Open, copy the saved .bat file to the directory (C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup) If you have any questions, please feel free to ask your antivirus program.

Notes:After booting, a cmd window will open, close it and the python program will stop running.

Above this python script boot self-start implementation method is all that I have shared with you, I hope to give you a reference, and I hope you support me more.