windowswinapiwindows-task-scheduler

Where can status reports made via `ITaskHandlerStatus` be accessed?


When implementing ITaskHandler for a Windows Scheduled Task implemented by a COM Server, one is given access to ITaskHandlerStatus to update status and report completion. Completion is required and works as expected, but I don't see anywhere to access status reports.

Where do scheduled task status reports go? How can they be accessed? Is this a feature that never got implemented? The documentation for the method is:

HRESULT UpdateStatus([in] short percentComplete, [in] BSTR statusMessage);
[in] percentComplete A value that indicates the percentage of completion for the COM handler.
[in] statusMessage The message that is displayed in the Task Scheduler UI.

I don't see them in the UI, nor in the event log, nor in the IRunningTask API.


Solution

  • It seems that the UpdateStatus message is not logged into the event log in any way. There are no interfaces or methods referencing state in any of the interfaces exposed by Microsoft. In my opinion, it is a case of an un-implemented method.

    I suggest you could refer to the thread: https://github.com/dahall/TaskScheduler/issues/837