Please try registering the task with the group information and let me know if that fixes the problem:
// Leave all setup code the same
ts.RootFolder.RegisterTaskDefintion("teste", td, TaskCreation.CreateOrUpdate, "BUILTIN\\Administrators", null, TaskLogonType.Group);