views:

1794

answers:

3

How do I change the credentials used by a scheduled task using C#.NET?

+3  A: 

Someone has written a task scheduler class library on codeproject.com, it might be what your after...

:)

Chalkey
A: 

Check out this library for working with TaskSheduler. It's written in VB, but I referenced it easily and called it from C#.

Martin Konicek
+1  A: 

Instead of using code, you can do it using 'SCHTASKS' command, run it using System.Diagnostic.Process.Start method with the parameters required. It's easy and not much effort required.

Durgesh Gupta