繁体   English   中英

仅在 CMD/终端中启动/启动 Windows 10 PC 时,是否有办法使 .exe 文件自动启动?

[英]Is there a way to make an .exe file automatically start when a Windows 10 PC is booted/started, only in the CMD/Terminal?

我对你的意思有点困惑。

我构建了一个 python package,它工作正常。 之后,我将 python package 从 .py 转换为 .exe 文件,并且 .exe 文件也可以正常工作。

但是在我将.exe 文件添加到C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup这个路径之后。 windows系统重新启动时运行.exe文件后会出现找不到文件的错误。 If I run the.exe file manually in a startup it works fine and it takes a path as C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup but after restarting the windows system it takes path C:\Windows\System32\ .

windows系统重启或开机时有没有其他方法可以自动运行文件?

您可以使用注册表在启动时运行文件,可以使用 HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run,但是在注册表中添加和删除值时请务必小心。

我不确定为什么启动文件夹对您不起作用,但是我很确定 buran 在他的可能答案中是正确的

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM