I was incorrect. That setting only works on XP and earlier. To do what you want on Vista and later, int the RegisterTaskDefinition method you need to supply a password and use the TaskLogonType.Password or InteractiveTokenOrPassword or you will need to use a service account (like System or Local Service) and the TaskLogonType.ServiceAccount or you can supply a normal account, use the TaskLogonType.S4U, and not access either the network or encrypted files.
↧