Hello all,
I did try the following code lines:
string currentUser =
td.Principal.LogonType = TaskLogonType.InteractiveToken;
but I still have the run whether user is logged in or not option selected.
Thanks in advance for help :)
Bob
I did try the following code lines:
string currentUser =
System.Environment.GetEnvironmentVariable("USERDOMAIN") +
@"\\" +
System.Environment.GetEnvironmentVariable("USERNAME");
td.Principal.UserId = currentUser;td.Principal.LogonType = TaskLogonType.InteractiveToken;
but I still have the run whether user is logged in or not option selected.
Thanks in advance for help :)
Bob