从计划任务中获取AT作业的应用程序名称 [英] get application names of AT jobs from scheduled tasks

查看:112
本文介绍了从计划任务中获取AT作业的应用程序名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
如何获得所有AT计划任务的应用程序名称的列表(编程C ++)?
但是我想知道如何通过使用功能NetScheduleJobGetInfo和AT_INFO结构来准确地做到这一点吗?

感谢

Hello,
How can I get a list (programming c++) of all the AT scheduled tasks'' application names?
But I want to know how to do it exactly by using function NetScheduleJobGetInfo and AT_INFO Structure?

Thanks

推荐答案

首先,您正在使用AT.EXE.此命令仅处理使用Task Scheduler 1.0操作的计划任务的子集.

很高兴知道:有Task Scheduler 1.0和Task Scheduler 2.0具有单独的API.计划任务的另一个实用程序是Schtasks.EXE.它还列出了AT.EXE列出的任务,并显示了通过Schtasks.EXE添加的其他任务.

要获得良好的概述和参考,请参阅 http://en.wikipedia.org/wiki/Task_Scheduler [ ^ ](以及本文档中的引用),http://en.wikipedia.org/wiki/At_(Windows) [ http://en.wikipedia.org/wiki/Schtasks [ ^ ].

我发现,有关计划任务的信息存储在注册表中,这里:
First of all, you''re using AT.EXE. This command handles only a subset of scheduled tasks manipulated using Task Scheduler 1.0.

It''s good to know: there are Task Scheduler 1.0 and Task Scheduler 2.0 with separate APIs. Another utility for scheduling tasks is Schtasks.EXE. It lists the tasks listed by AT.EXE as well and show additional tasks added via Schtasks.EXE.

For a good overview and references, see http://en.wikipedia.org/wiki/Task_Scheduler[^] (and references from this document), http://en.wikipedia.org/wiki/At_(Windows)[^], http://en.wikipedia.org/wiki/Schtasks[^].

As I found, information on scheduled tasks is stored in the registry here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SchedulingAgent


但是,它并没有太大帮助.在此键下,值TasksFolder为您显示任务存储的目录(在我的系统上为%SystemRoot%\Tasks).每个任务都以二进制格式存储在单独的* .JOB文件中;字符串显然以UTF-16LE表示-仅此而已.我认为没有记录这种格式.您确实需要使用1.0版或2.0版的任务计划程序API访问此数据.

这是用于使用任务计划程序API v.1.0枚举计划任务的Microsot示例: http://msdn.microsoft.com/en-us/library/aa446831(v = VS.85).aspx [ http://msdn.microsoft .com/en-us/library/aa446831(v = VS.85).aspx [ http://msdn.microsoft.com/zh-cn/library/aa383614(v = VS.85).aspx [


However, it does not help much. Under this key, the value TasksFolder shows you the directory where the tasks are stored (on my system, this is %SystemRoot%\Tasks). Each task is stored in a separate *.JOB file in binary format; the strings are apparently represented in UTF-16LE — that''s all. I don''t think this format is documented. You really need to access this data using Task Scheduler API, version 1.0 or 2.0.

This is the Microsot example for enumerating of scheduling tasks using Task Scheduler API v.1.0: http://msdn.microsoft.com/en-us/library/aa446831(v=VS.85).aspx[^]
For the similar sample with v.2.0, see http://msdn.microsoft.com/en-us/library/aa446831(v=VS.85).aspx[^].

For more information, start here: http://msdn.microsoft.com/en-us/library/aa383614(v=VS.85).aspx[^].

—SA


这篇关于从计划任务中获取AT作业的应用程序名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆