I want to create a program so that what I say, “Add Task.” it asks me all the variables like, “task name” and the others.
I then use the system() to use the following command:
schtasks /create /tn TaskName /tr TaskRun /sc schedule /mo modifier
How do I use C++ variables in the system() command?
or, if you have a better way to do this, let me know.
Thanks for your help.
-Chris
You can use the Task Scheduler API. It comes in two versions:
Also, from the documentation, take note of the environments supported by each API.