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

How to detect if v2 task is set to 'Run whether user is logged on or not'?

Topics: Errors
Jan 10, 2016 at 2:53 PM
Edited Jan 10, 2016 at 3:15 PM
The property td.Settings.RunOnlyIfLoggedOn is marked as version 1 only.
For v2 tasks is seems to always return True

How can we identify if a v2 task is set to 'Run whether user is logged on or not'?

Looks like RunOnlyIfLoggedOn is True in v2 tasks if the LogonType is:
Please consider hiding that complexity by adding READ ONLY access to the RunOnlyIfLoggedOn proeprty even for v2 tasks. That would also remove the uncertainty (I'm not sure that the logic above is indeed complete).
Jan 13, 2016 at 5:03 AM
I found a small bug that didn't disable that checkbox under V1. It is now corrected.
Jan 13, 2016 at 11:16 AM
I don't think that change addresses my question/suggestion.
In a v2 scenario, how should we get the status of the attribute?
Jan 13, 2016 at 3:43 PM
That checkbox should only be available now under V2.

I'm not sure what the request is. Do you want something hidden in the UI? If so, I'd rather not as I have tried to stay the same as the system UI. In C#, there is not a way to make a property read-only some of the time and read/write other times so there is no way to hide it for a developer that I can think of. If you other specific ideas, please let me know.
Jan 13, 2016 at 5:05 PM
The question was not about the GUI.
In code, accessing a v2 task object, How to detect if it is set to 'Run whether user is logged on or not'?