Do not store password

Topics: Errors
Dec 3, 2012 at 7:24 AM

Hello.

How can I set up "Run whether user is logged on or not" and "Do not store password" options for a task programmaticaly?

I know if I don't set TASK_FLAG_RUN_ONLY_IF_LOGGED_ON flag then "Run whether user is logged on or not" option is set.

But it works only for SYSTEM account, for any other account I get this error:

The task has been configured with an unsupported combination of account settings and run time options..

And how can I set "Do not store password option?"

Coordinator
Dec 3, 2012 at 6:21 PM

"Run only when user is logged on", when checked, sets the TaskLogonToken to InteractiveToken. When "Run wheter user is logged on or not" is checked, if "Do not store password" is checked, it is set to S4U or Password if not.