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: dahall **
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: dahall **
This weekend most likely. I'm also working on another bug for that release.