【问题标题】:How to run existing windows 7 task using command prompt如何使用命令提示符运行现有的 Windows 7 任务
【发布时间】:2012-03-26 19:28:22
【问题描述】:

我在 Windows 7 任务计划程序中创建了一个任务。

如何使用命令提示符运行它?

【问题讨论】:

    标签: windows-7 command-line scheduled-tasks


    【解决方案1】:

    语法为:schtasks /Run /TN "task name"

    欲了解更多信息,请参阅:

    Run a Task on Demand (MS TechNet)

    【讨论】:

    • 如果任务没有启用Allow task to be run on demand怎么办?它给出了一个错误。如何开启按需运行?
    • 在设置中打开任务并勾选/启用按需运行怎么样?你问如何以编程方式做到这一点?您需要为此找到一个 API。任务参数存储在注册表中(至少在 Windows 7 中,在 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks 下),但它以哈希的形式存储,因此更新起来并不容易
    猜你喜欢
    • 2014-06-09
    • 2011-06-05
    • 1970-01-01
    • 1970-01-01
    • 2019-01-11
    • 2013-07-13
    • 2018-05-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多