Question : Create task in task scheduler programmatically

How to create/delete a task inside task scheduler?
Please provide sample code  using C# or VB.net

When creating task, I am interested in how schedule tasks weekly and assigning an expiry date (trigger) and how to add conditions.

I have already found these two links, but are not detailed enough:
http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/06e64804-23ca-49d1-be3a-5c6d28becc94
http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/bbf31e04-87c8-42aa-be6c-01ab4d2d9890
Target OS: XP SP3, Windows 2003/2008

Answer : Create task in task scheduler programmatically

check http://www.codeproject.com/KB/cs/tsnewlib.aspx

SetAccountInformation can be used for the credentials. maybe there is also something for the trigger.

Random Solutions  
 
programming4us programming4us