Reputation: 20761
I've a little c# application, and I have to create a scheduled task for this application.
I have a Setup which installs the application, and the best case will be that I can set this windows scheduled task at the installation.
Any idea if it's possible and/or how?
Thank you very much
Upvotes: 9
Views: 6606
Reputation: 17868
This may not be a whole answer, but depending on the installer (for example I think wise does it) you can setup tasks from there. Otherwise, you could call your app with a special commandline parameter to do so and utilise the api http://msdn.microsoft.com/en-us/library/aa383614.aspx as a possibility
Upvotes: 0
Reputation: 499312
There is a Task Scheduler Managed Wrapper on codeplex - this can be used to create a small console application that will setup a task and can be run by your installer.
You can also run the schtasks
command line utility for a similar result.
Upvotes: 8