I have tested again and found a new issue) Sometime unnecessary dialog appears for current user. I don't know how but right now I have two tasks with current user as runner but its name has different cases.
I guess string.Compare(UserId, System.Security.Principal.WindowsIdentity.GetCurrent().Name) should compare with ignore case (StringComparison.OrdinalIgnoreCase).
Thank you.
I guess string.Compare(UserId, System.Security.Principal.WindowsIdentity.GetCurrent().Name) should compare with ignore case (StringComparison.OrdinalIgnoreCase).
Thank you.