Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing full articles (2206 articles)
Browse article index
↧

New Post: Cannot create task with BootTrigger programmatically

$
0
0
I want to create a task with BootTrigger programmatically. The issue is that when I try to create it, I get an access denied exception, even if the user has admin rights. Is there anything that I am doing wrong?
var trigger = new BootTrigger();
trigger.Delay = TimeSpan.FromMinutes(2);
trigger.Repetition = new RepetitionPattern(TimeSpan.FromMinutes(1), TimeSpan.Zero);
var accion = new ExecAction(Path.GetFullPath("executable.exe"));
ts.AddTask("task", trigger, accion, "username", "password", TaskLogonType.Password, "task");
↧

Viewing full articles (2206 articles)
Browse article index

Latest Images

Trending Articles



Latest Images