若要设置定时,可采用任务计划的方式调用程序:C:\Windows\System32\shutdown.exe
shutdown.exe
常用参数:
shutdown /s 关机
shutdown /s /t 时间 设置关机倒计时,单位秒
shutdown /f 强行关闭应用程序
shutdown /r 关机并重启
shutdown /l 注销当前用户
shutdown /a 取消关机
立即关机并重启
shutdown.exe -r -f -t 0
60秒后关机
shutdown.exe -s -f -t 60