iversonjimmy,
Thanks for posting. I have same requirement run task whether the user is logged on or not
Where should I change the code to get work? I have tried following, but not work. what is RP, how to pass it? thank you in advance!!!
Fanyin
Thanks for posting. I have same requirement run task whether the user is logged on or not
Where should I change the code to get work? I have tried following, but not work. what is RP, how to pass it? thank you in advance!!!
Fanyin
TaskDefinition td = ts.NewTask();
td.RegistrationInfo.Description = "Import Blood Loss Data";
td.RegistrationInfo.Author = domain + @"\" + username;
td.Principal.RunLevel = TaskRunLevel.Highest;
td.Principal.LogonType = TaskLogonType.ServiceAccount;
td.Principal.UserId = domain + @"\" + username;