Closed arsalansaleem96 closed 3 years ago
RegisterChanges
will fail if the task was created with a password. Is that the case here?
No it's not created with password. I have also posted on stackoverflow.
Have you looked at the examples in the Wiki and in about 20 other closed issues? This is a very common problem with a variety of fixes depending on your environment. I'd start with #782.
Yess I have tried different solutions. I gave all the security permissions . Also, I have tried just assigning the new action to the position of the old one as you mentioned above #782 . Unfortunately, the issue still there.
I am getting this exception.
You can also see stacktrace.
Were you able to work around your issue?
In windows I have created task scheduler with trigger "At system startup". Now I'm trying to update the taskDefinition using
task.RegisterChanges();
It's giving me this exception Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))The scheduler was created using Admin account and I'm using the same account to update the scheduler.