How to create new Scheduled Task Programmatically?

Answered How to create new Scheduled Task Programmatically?

  • Sunday, July 12, 2009 1:27 PM
     
     
    I am interested in creating a new scheduled task for Vista / Windows 7 and I am intersted in doing in programmatically for my program. For windows XP I used:

    System.Diagnostics.Process.Start("schtasks", @"/create /tn TestTast /tr C:\test.exe /sc daily /st 18:55:00");
    
    

    How would I go about doing this for Vista / Windows 7 programmatically, if I also wanted to 'select' the "Run task as soon as possible after a scheduled start is missed" option?

    Thank you

    M.Ahrens
    • Edited by Malte Ahrens Sunday, July 12, 2009 1:28 PM Fixed Formating Issue
    •  

All Replies