Here's a good one. I have spent all day researching this, and I can not for the life of me find a method that will work.
All I want to do... is add a scheduled task to the Task Scheduler.
I have seen this:
http://www.c-sharpcorner.com/UploadFile/ajifocus/AppScheduler05262006074807AM/AppScheduler.aspx
which is not what I want. Windows already has a scheduler program in there, I dont need to rewrite it. If I wanted that, I would just write a console program that hide itself and thread.sleep till the time I wanted it to fire the other program.
I also found this:
http://www.codeproject.com/csharp/tsnewlib.asp
but the library is out of date, and will not mesh with my code. Also, I would rather write the code myself even if I have to deal with the COM and the like, not use someone else's library.
Finally, I have found this:
http://www.dotnet247.com/247reference/msgs/12/62007.aspx
That does not work either. Or at least my implementation of it was not working. I changed the location of notepad.exe to reflect its actual location, set it to run on thursday (8), and any day of the month (0), and set the start time 1 minute after I add it to the list... and nothing happened.
So ya, all I want is to know how to add a scheduled task. Doesnt need to be fancy, just needs to run once.