Programmatically Creating a Scheduled Task in Windows - 0x8004130f Error

前端 未结 3 537
无人共我
无人共我 2021-02-02 14:36

I am having major problems getting a scheduled task to run. The task is created fine using the ITaskScheduler interface provided by Microsoft. The task is set to run only if a u

3条回答
  •  长发绾君心
    2021-02-02 14:52

    As far as I know, and the documentation backs this up, an account is required for a scheduled task. If you set the task to run only when a user is logged in that only means a password is not necessary, you still need an account. This account can be set to a group so that the task will be run when it is triggered as long as anyone in the group is logged on. For instance you can set the account to 'Users' so that the task can run when anyone is logged on.

提交回复
热议问题