简体   繁体   English

如何使用python启动pc(windows)

[英]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.

相关问题 如何在电脑启动时运行 python 脚本,但每天只运行一次? - How to run python script on start up of pc but only once in day? 如何在Windows PC的C盘中使用python脚本创建文件? - How to create a file using a python script in the C drive of a windows PC? 在 Windows 上启动时运行 Python 程序 - Run a Python program at start-up on Windows 在PC / Linux上使用Python读取Quicktime电影的开始时间代码 - Reading start timecode of Quicktime movie using Python on PC/Linux 如何在Windows PC上使用python脚本在Unix上截屏? - How do I take screenshot on Unix using python script on windows PC? 如何在 Windows 10 PC 上使用 Python 3.7 和 Mutagen 写入 ID3 标签 WFED URL 框架 - How to write to the ID3 tag WFED URL frame using Python 3.7 and Mutagen on a Windows 10 PC 如何在不使用 Windows Vista 上的快捷方式的情况下启动 IDLE(Python 编辑器)? - How to start IDLE (Python editor) without using the shortcut on Windows Vista? 如何在 Windows 上的 python 中启动进程? - how to start a process in python on windows? 如何使用 Python 脚本启动 Windows? - How to start Windows with a Python script? 使用python连接树莓派和Windows PC的套接字编程 - socket programming using python to connect raspberry pi and windows PC
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM