gpt4 book ai didi

windows - 在 win 7 任务计划程序中顺序运行批处理文件

转载 作者:可可西里 更新时间:2023-11-01 12:34:12 25 4
gpt4 key购买 nike

我在单个任务中有 2 个批处理文件作为“操作”。第一个使用 Microsoft Security Essentials 扫描病毒。第二个让电脑进入休眠状态。问题是,当任务运行时,似乎两个批处理文件同时运行,也就是说,我可以看到病毒扫描开始,但随后计算机几乎立即进入休眠状态,所以扫描真的没有机会开始。我知道批处理文件会在任务调度程序中按顺序运行。我错了吗?如何让 sleep 批处理文件等到扫描批处理文件完成?这是 2 个简单的批处理文件...

批处理文件一

"C:\Program Files\Microsoft Security Essentials\MpCmdRun.exe"-scan -scantype 1

批处理文件二

powercfg -h 关闭

rundll32.exe powrprof.dll,SetSuspendState 0,1,0

powercfg -h 打开

最佳答案

可以使用适用于 Windows 7、Windows Server 2008 R2、Windows Server 2012、Windows Vista 的 Windows 计划任务。

来自微软documentation :

A task action is the work that is performed when the task is run. A task can have a single action or a maximum of 32 actions. Each action contains settings that determine how the action is performed. A task's actions are displayed on the Actions tab of the Task Properties or Create Task dialog box. When multiple actions are specified, they are executed in sequential order starting with the action at the top of the list in the Actions tab...

关于windows - 在 win 7 任务计划程序中顺序运行批处理文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4391768/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com