使用参数延迟shutdown.exe

时间:2018-11-18 20:36:22

标签: batch-file scheduled-tasks

使用任务计划程序,在天黑后,我会使用参数-s -t 350运行shutdown.exe。我要制作的是一个批处理文件或类似文件,该文件可以将这段时间延长固定的时间。到目前为止,我已经尝试了以下方法

@echo off
cd %windir%\system32
start shutdown.exe /a
start shutdown.exe /s /t 250
exit

仅/ a行符合预期,并且shutdown.exe不会再次启动。情况如何?如何解决?

预先感谢

1 个答案:

答案 0 :(得分:0)

我一直告诉你输start。您不使用start正常启动程序。也不要命名批处理文件shutdown

shutdown.exe /a
shutdown.exe /s /t 250