{"action":"created","issue":{"url":"https://api.github.com/repos/dahall/TaskScheduler/issues/754","repository_url":"https://api.github.com/repos/dahall/TaskScheduler","labels_url":"https://api.github.com/repos/dahall/TaskScheduler/issues/754/labels{/name}","comments_url":"https://api.github.com/repos/dahall/TaskScheduler/issues/754/comments","events_url":"https://api.github.com/repos/dahall/TaskScheduler/issues/754/events","html_url":"https://github.com/dahall/TaskScheduler/issues/754","id":314374763,"number":754,"title":"TaskLogonType.Group  Error on Windows 7 professional","user":{"login":"dahall","id":14349943,"avatar_url":"https://avatars0.githubusercontent.com/u/14349943?v=4","gravatar_id":"","url":"https://api.github.com/users/dahall","html_url":"https://github.com/dahall","followers_url":"https://api.github.com/users/dahall/followers","following_url":"https://api.github.com/users/dahall/following{/other_user}","gists_url":"https://api.github.com/users/dahall/gists{/gist_id}","starred_url":"https://api.github.com/users/dahall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dahall/subscriptions","organizations_url":"https://api.github.com/users/dahall/orgs","repos_url":"https://api.github.com/users/dahall/repos","events_url":"https://api.github.com/users/dahall/events{/privacy}","received_events_url":"https://api.github.com/users/dahall/received_events","type":"User","site_admin":false},"labels":[{"id":901867625,"url":"https://api.github.com/repos/dahall/TaskScheduler/labels/codeplex-disc","name":"codeplex-disc","color":"e5e5e5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-04-15T00:47:51Z","updated_at":"2018-04-15T00:47:59Z","closed_at":null,"author_association":"OWNER","body":"I need to create a task that will from time to time on different user admin accounts .  \r\nSo, when I try using the \"Principal.LogonType = TaskLogonType.Group;\" on my computer with Windows 8, it works fine, but when I use this on a Windows 7 professional, it gives an error on the \"LogonType\".  \r\n  \r\nI just get a code from you to test this.  \r\n\r\n\r\n    try\r\n                {\r\n                    TaskService ts = new TaskService();\r\n                    TaskDefinition td = ts.NewTask();\r\n                    td.RegistrationInfo.Description = &quot;Run  teste &quot;;\r\n                    td.Settings.DisallowStartIfOnBatteries = false;\r\n                    td.Settings.ExecutionTimeLimit = TimeSpan.Zero;\r\n                    td.Principal.GroupId = &quot;BUILTIN\\\\Administrators&quot;;\r\n                    td.Principal.LogonType = TaskLogonType.Group;\r\n                    td.Triggers.Add(new LogonTrigger());\r\n                    td.Actions.Add(new ExecAction(Application.StartupPath + &quot;\\\\teste.exe&quot;, null, null));\r\n                    ts.RootFolder.RegisterTaskDefinition(&quot;teste&quot;, td);\r\n    \r\n                    MessageBox.Show(&quot;Test Ok&quot;);\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    MessageBox.Show(&quot;ex: &quot; + ex.ToString());\r\n                }\r\n\r\nIf I change the \"TaskLogonType.Group;\" to another type, it doesn't give any error, but it doesn't work, because I need to run as Administrators.  \r\n  \r\nThe error message is:  \r\n\r\n\r\n> COMException (0x80070534):(49,8):LogonType : in RegisterTaskDefinition in C:\\Users\\dahall\\Documentos\\VisualStudio2010\\Projects\\TaskService\\TaskFolder.cs:line448 and line 391\r\n\r\n\n\rOriginally posted: 2017-05-30T20:51:02"},"comment":{"url":"https://api.github.com/repos/dahall/TaskScheduler/issues/comments/381371835","html_url":"https://github.com/dahall/TaskScheduler/issues/754#issuecomment-381371835","issue_url":"https://api.github.com/repos/dahall/TaskScheduler/issues/754","id":381371835,"user":{"login":"dahall","id":14349943,"avatar_url":"https://avatars0.githubusercontent.com/u/14349943?v=4","gravatar_id":"","url":"https://api.github.com/users/dahall","html_url":"https://github.com/dahall","followers_url":"https://api.github.com/users/dahall/followers","following_url":"https://api.github.com/users/dahall/following{/other_user}","gists_url":"https://api.github.com/users/dahall/gists{/gist_id}","starred_url":"https://api.github.com/users/dahall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dahall/subscriptions","organizations_url":"https://api.github.com/users/dahall/orgs","repos_url":"https://api.github.com/users/dahall/repos","events_url":"https://api.github.com/users/dahall/events{/privacy}","received_events_url":"https://api.github.com/users/dahall/received_events","type":"User","site_admin":false},"created_at":"2018-04-15T00:47:59Z","updated_at":"2018-04-15T00:47:59Z","author_association":"OWNER","body":"Have you run the [Troubleshooter](https://taskscheduler.codeplex.com/releases/view/622295) on the offending system? That may also give you some insight to problem with permissions.  \r\n\n\rOriginally posted: 2017-07-24T08:26:53"}}
{"actor":{"display_login":"dahall"}}