To show an application running interactively, you must specify a LogonType of InteractiveToken. You can skip setting the td.Principal.LogonType property and just do it through the RegisterTaskDefinition method (e.g. RegisterTaskDefinition("TestNewest", td, TaskCreation.CreateOrUpdate, null, null, TaskLogonType.InteractiveToken)).
↧