Hi,
Since version Release 2.5.17 I'm unable to schedule a task using "computername\username"
This worked in version Release 2.4.2
Example:
Computer is Lan
User is LanUser
Please note that it's a local admin account (not domain)
Trying to log in with Lan\LanUser fails with "Access is denied"
Comments: ** Comment from web user: BertDM **
Since version Release 2.5.17 I'm unable to schedule a task using "computername\username"
This worked in version Release 2.4.2
Example:
Computer is Lan
User is LanUser
Please note that it's a local admin account (not domain)
Trying to log in with Lan\LanUser fails with "Access is denied"
Comments: ** Comment from web user: BertDM **
```
WindowsImpersonationContext ImpersoToken = Impersonate(User, Domain, password);
if (ImpersoToken != null)
{
using (ImpersoToken)
{
using (TaskService ts = new TaskService(hostname, null, null, null, !IsVistaOrLater))
{
TaskDefinition tduser = ts.NewTask();
tduser.Actions.Add(new ExecAction("cmd", "/c set >> " + rootPath + "\\Test.txt", null));
ts.RootFolder.RegisterTaskDefinition("Tester", tduser, TaskCreation.Create, Domain + "\\" + User, password, TaskLogonType.Password);
ts.GetTask("Tester").Run();
}
}
}
```