In your scenario, the task is being created under different privileges. I believe the Window's Task Scheduler application always runs as Administrator. To ensure that your application behaves the same, you will need to decorate it with the appropriate attributes that force the UAC to grant Administrator rights or you will have to use the TaskService constructor to provide account information for an Administor account.
↧