1. 在shell中执行 : powercfg -H off //关闭休眠功能,因为如果不关闭,下面的命令会优先选择执行休眠而不是睡眠 (开启休眠功能:powercfg -H on) 2. 编写txt文件 内容: rundll32.exe powrprof.dll,SetSuspendState Sleep 3. 后缀名改为.bat