Hi.
I'm creating a new task in XP using the following code.
Code:
NewWorkItem()
SetApplicationName()
SetParameters()
SetWorkingDirectory()
SetAccountInformation()
CreateTrigger()
TASK_TRIGGER pTrigger;
ZeroMemory(&pTrigger, sizeof(TASK_TRIGGER));
pTrigger.wBeginDay =1; // Required
pTrigger.wBeginMonth =1; // Required
pTrigger.wBeginYear =1999; // Required
pTrigger.cbTriggerSize = sizeof (TASK_TRIGGER);
pTrigger.wStartHour = chTime;
pTrigger.TriggerType = TASK_TIME_TRIGGER_DAILY;
pTrigger.Type.Daily.DaysInterval = 1;
SetTrigger(&pTrigger)
QueryInterface(IID_IPersistFile, (void **)&pIPersistFile);
pIPersistFile->Save
this works well, and the task is created, but it doesn't run...
Am i missing something??
Edit:
I shortened the code a bit, as there's alot of error handling/data formatting for each step..