Our applications are using Windows Scheduler to update themselves once a day. Apparently, our updater does not work if a computer is connected to battery / laptop.
So what we need are:
1. The battery and network issue can be solved by creating XML task and pushing it.
2. XML does not work on Windows XP.
3. NSIS is too 'simple' to make an effective solution - we want a nice C++ app.
The task:
Create an internal task scheduler.
Function receives:
1. Task name
2. Task description
3. App to start
4. When to run: daily, per login, every X minutes. - several items can be selected together
Enclosing the XML file - we think there should be a template XML and the application should replace tags inside. This will allow a very easy maintenance.
Task has do be created under system context.
App should support create and delete of its tasks.
Samples of activating task scheduler:
Using on Vista,7,8: schtasks /create /tn test /xml [login to view URL] /RU system
Using on XP and others: chtasks /Create /SC Daily /TN test /TR [login to view URL] /RU system
Using of the new app
1. Create:
[login to view URL] /create [name] [executable file full path] [daily,login,3h]
login may be present for hours - it repeats the tasks every X hours after it happened ... so login must be there.
2. Delete:
[login to view URL] /delete [name]
3. Return:
0 if ok
-1 if error