D
def0
I created a task using task scheduler 1.0 interface, following the example in
MSDN, with the following instruction to set the "run only if logger on"
property. The user is the current user and password is null.
spTask->SetFlags(TASK_FLAG_RUN_ONLY_IF_LOGGED_ON);
spTask->SetAccountInformation(xxx, NULL);
After that, I called
spTask->EditWorkItem(hWnd, 0);
to show up a property sheet to let the user change time.
It works properly on XP and Vista, but with Vista SP1, after the user
changed the time and clicked OK, there was a strange "Set Account
Information" dialog box showed up. It was weird because I had already set the
"TASK_FLAG_RUN_ONLY_IF_LOGGED_ON" flag, so the task didn't need to store a
password.
And further more, that dialog doesn't actually do anything, it accept any
user name and password without checking them.
Any suggestion/information is welcome.
Thanks.
MSDN, with the following instruction to set the "run only if logger on"
property. The user is the current user and password is null.
spTask->SetFlags(TASK_FLAG_RUN_ONLY_IF_LOGGED_ON);
spTask->SetAccountInformation(xxx, NULL);
After that, I called
spTask->EditWorkItem(hWnd, 0);
to show up a property sheet to let the user change time.
It works properly on XP and Vista, but with Vista SP1, after the user
changed the time and clicked OK, there was a strange "Set Account
Information" dialog box showed up. It was weird because I had already set the
"TASK_FLAG_RUN_ONLY_IF_LOGGED_ON" flag, so the task didn't need to store a
password.
And further more, that dialog doesn't actually do anything, it accept any
user name and password without checking them.
Any suggestion/information is welcome.
Thanks.