Having problem with login type

Oct 27, 2009 at 3:37 AM

Hi All,

I want to use "NT AUTHORITY\SYSTEM" account and switch "Run only if logged on" off. For some reason, the following code doesn't work. The Scheduled task was generated by using current logged on account and "Run only if logged on"option is always on... can someone please help!!


using (var ts = new TaskService()){


                td.Principal.UserId = "SYSTEM";
                td.Principal.LogonType = TaskLogonType.ServiceAccount   ;
                td.Settings.RunOnlyIfLoggedOn = false;
                td.Settings.Enabled = true;








Oct 27, 2009 at 4:53 AM

See http://www.codeplex.com/taskscheduler/Thread/View.aspx?ThreadId=45013 for information on using the local system account.