This project has moved and is read-only. For the latest updates, please go here.

Server 2008 "Do not store password" being reset

Topics: Errors
Oct 3, 2014 at 1:32 PM
When I change the password (or do any kind of update) to an existing task on Server 2008, the "Do not store password" checkbox is always reset to Checked.

Possibly related, in the debugger I always see td.Settings.RunOnlyIfLoggedOn = true.

I am doing the update with:
TaskDefinition td = task.Definition;
taskservice.RootFolder.RegisterTaskDefinition(.taskname, td, TaskCreation.CreateOrUpdate,
task was retrieved with:

Is there some way to make it leave the "Do not store password" setting alone?

Oct 3, 2014 at 1:46 PM
I figured it out myself. I needed to add TaskLogonType.Password.

Marked as answer by dahall on 10/3/2014 at 9:18 AM