[英]How to start up pc (windows) using python
I have learned about python script to shutdown the pc like: os.system(shutdown /s /t 0)我已经了解了关闭 pc 的 python 脚本,例如: os.system(shutdown /s /t 0)
But what I was wondering about is to write a script using python which will start up the pc at a specific time after its been shutdown.但是我想知道的是使用 python 编写一个脚本,它会在电脑关闭后的特定时间启动它。 The os I am using is Windows10.
我使用的操作系统是 Windows10。
Can anyone help me please.任何人都可以请帮助我。
It is not possible directly.直接是不可能的。 When your system is shut down no programs can run, including python.
当您的系统关闭时,任何程序都无法运行,包括 python。 However it might be possible to set up Wake On Lan functionality and use python on another computer to send the WOL packet.
但是,可以设置 Wake On Lan 功能并在另一台计算机上使用 python 发送 WOL 数据包。 Anorher solution would be to go into BIOS (UEFI on newer machines) and schedule wakeup times.
另一种解决方案是进入 BIOS(较新机器上的 UEFI)并安排唤醒时间。 No python needed.
不需要蟒蛇。 Or thereay be a way to use python on Win10 to modify UEFI settings in order to set up a wakeup event
或者有一种方法可以在Win10上使用python来修改UEFI设置以设置唤醒事件
You can do this with BIOS or UEFI settings : https://lifehacker.com/how-can-i-start-and-shut-down-my-computer-automatically-5831504您可以使用 BIOS 或 UEFI 设置执行此操作: https : //lifehacker.com/how-can-i-start-and-shut-down-my-computer-automatically-5831504
You can run Python scripts also the boot loader however you can not start up your computer with these scripts : https://lwn.net/Articles/641244/您可以在引导加载程序中运行 Python 脚本,但是您无法使用这些脚本启动计算机: https : //lwn.net/Articles/641244/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.