This project has moved and is read-only. For the latest updates, please go here.

LastRunResult column in Task Scheduler not the same as LastTaskResult in Wrapper

Topics: Errors
Nov 19, 2016 at 2:55 PM
I notice this happens on Windows Server 2012 R2.

I created a new task and this task is yet to run. By using the Task Scheduler Managed Wrapper, it returns status code 0x1 in LastTaskResult property. Whereas when i checked the Task Scheduler Windows, it shows a blank value under LastRunResult column.

It doesn't happen on Windows Server 2016 due to the behavior seems different that it shows status code 0x41303 instead of a blank value.

So, is it normal to return 0x1 status for blank status as shown in Task Scheduler Window?
Dec 6, 2016 at 9:41 PM
It could. The wrapper library goes a step further than the native when looking for the last run result. Not only does it check the value displayed in the Task Scheduler applet, but if that doesn't return a value, it looks at the event log.
Marked as answer by dahall on 12/6/2016 at 1:41 PM