Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

Commented Issue: The task has been configured with an unsupported combination of account settings and run time options. [12293]

$
0
0
Hi,

Since I've updated to the latest stable release(2.5.4) I'm getting the following error:
_The task has been configured with an unsupported combination of account settings and run time options. (Exception from HRESULT: 0x80041314)_
This did not happen with version 2.4.2 and lower (doublechecked it)

What happens is:
I'm contacting a Win7 machine but i specify the taskservice to use 1.1 version.
Then i register a task with the serviceaccount.
I've been able to reproduce this error several times

Can you confirm this as a bug?

Code (C#):
```
using (TaskService ts = new TaskService(hostname, null, null, null, true))
{
TaskDefinition tduser = ts.NewTask();
bool newVer = (ts.HighestSupportedVersion >= new Version(1, 2));
tduser.Actions.Add(new ExecAction("cmd", "Do something", null));
tduser.Settings.DisallowStartIfOnBatteries = false;
tduser.Settings.StopIfGoingOnBatteries = false;
tduser.RegistrationInfo.Description = "My Task";
if (newVer) //v2.0
{
tduser.Principal.RunLevel = TaskRunLevel.Highest;
tduser.Settings.AllowDemandStart = true;
}
ts.RootFolder.RegisterTaskDefinition("My Task", tduser, TaskCreation.CreateOrUpdate,
"system", null, TaskLogonType.ServiceAccount); //this crashed
ts.GetTask("My Task").Run();
}
```
Comments: ** Comment from web user: BertDM **

This was indeed working.

The reason why i know this is because we have a subnet of Win 7 computer that all return version 1.1 while they should have the newer version (i know, it's crazy...)

I used to be able to access the scheduler, but not anymore.


Viewing all articles
Browse latest Browse all 2206

Trending Articles