我在运行计划任务时遇到了重大问题。使用 Microsoft 提供的 ITaskScheduler 接口可以很好地创建任务。该任务设置为仅在用户登录时运行。
问题是任务没有运行,日志文件 SchedLgU.txt 引用的原因是:
"The attempt to retrieve account information for the specified task failed; therefore, the task did not run. Either an error occurred, or no account information existed for the task.
The specific error is:
0x8004130f: No account information could be found in the Task Scheduler security database for the task indicated."
我知道可以在没有帐户信息的情况下创建计划任务,因为 Google Updater 计划任务可以执行此操作,并且运行良好。
我可以从网络搜索中收集到的是,Windows 有一个“计划任务数据库”,它需要为每个任务提供凭据信息才能运行。
有谁知道如何修改这个凭证数据库或任何其他方式让我的任务运行?