Use the Enumerate all task example (http://taskscheduler.codeplex.com/wikipage?title=Examples#enum) and then use the Task.TaskDefinition.Principal.UserId property to get the username. Once you have that, you can use TaskFolder.RegisterTaskDefinition method to re-register the task with a different set of credentials.
↧