[英]How to make python script autorun on windows startup?
I have a.python script which I convert to.exe file trough autopy-to-exe command and I would like that coverted.exe file always running, so when computer restarts it automaticly starts.我有一个 .python 脚本,我通过 autopy-to-exe 命令将其转换为 .exe 文件,我希望该 coverted.exe 文件始终运行,因此当计算机重新启动时它会自动启动。
So I want to create in.python script that.所以我想创建 in.python 脚本。 I want to configure it so when somebody downloads.exe file and runs it, that.exe file will be in his startup so next time when he logs in that.exe will be working as well.我想对其进行配置,以便当有人下载 .exe 文件并运行它时,该 .exe 文件将在他的启动中,因此下次他登录时,该 .exe 文件也将正常工作。
The simplest way to accomplish this is by placing it in your Startup directory.完成此操作的最简单方法是将其放在启动目录中。 Windows will launch anything in there when someone signs in. You may also set this to run when any user logs in by using the "All Users" Startup folder. Windows 将在有人登录时启动其中的任何内容。您还可以使用“所有用户”启动文件夹将其设置为在任何用户登录时运行。
This is the filepath for the Startup folder, for your user account:这是启动文件夹的文件路径,用于您的用户帐户:
%appdata%\Microsoft\Windows\Start Menu\Programs\Startup
and you can copy and paste that path right into Windows Explorer's address bar to get there.您可以将该路径复制并粘贴到 Windows Explorer 的地址栏中以到达那里。 Drop in the.exe and it will launch on the next login.放入 .exe,它将在下次登录时启动。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.