我想知道 Windows 在哪里存储计划任务的信息.我希望能够找到与给定任务相关联的要运行的名称、计划或命令的参考.这可能不切实际或不可能,但我还想要一种在计划任务控制台之外编辑计划任务及其属性的方法.我假设数据会在注册表中的某个地方,因为我怀疑它会存储在普通文件中,但我不确定应该在哪里查找.
I would like to know where Windows stores information for Scheduled Tasks. I would like to be able to find the reference for the name, schedule, or command to run associated with a given task. This may not be practical or possible, but I would also like a means to edit the scheduled tasks and their attributes outside the Schedule Tasks console. I've assumed that the data would be in the Registry somewhere, since I doubt it would be stored in a normal file, but I'm uncertain where I should be looking.
推荐答案Windows 将计划任务存储为 XML 文件,并保存在注册表中.
Windows stores scheduled tasks as XML files, AND in the registry.
您可以在几个地方找到它们:
You can find them in a few places:
文件系统:
%systemroot%\System32\Tasks%systemroot%\任务
%systemroot%\System32\Tasks %systemroot%\Tasks
注册:
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\Taskcache\TasksHKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\Taskcache\Tree
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\Taskcache\Tasks HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\Taskcache\Tree
注意:出于安全原因,您不能直接在 \Tasks 中编辑 XML 文件.请参阅此处了解更多信息:serverfault/questions/440496/ok-to-edit-tasks-xml-file-in-c-windows-system32-tasks
Note: You can't edit the XML files directly in \Tasks for security reasons. See here for more information: serverfault/questions/440496/ok-to-edit-tasks-xml-file-in-c-windows-system32-tasks
要在不通过计划任务 UI 的情况下导入 XML 文件,您可以查看以下内容:
To work with importing the XML files without going through the scheduled task UI you can look at these:
Schtasks.exePowershell 计划任务 Cmdlets
更多推荐
Windows 在哪里存储计划任务控制台的设置?
发布评论