Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

New Post: RegisterTaskDefinition with Windows Service credentials

$
0
0
Hi,
I'm currently scheduling tasks using SYSTEM account:
  folder.RegisterTaskDefinition(task.name, td, TaskCreation.CreateOrUpdate,
     "SYSTEM", null, TaskLogonType.ServiceAccount);
Scheduling is done from a Windows Service, that is configured by default with SYSTEM account. Since windows service's user credentials can be modified, I would like to schedule tasks using the user who is currently running the service, instead of always using SYSTEM.

Is it possible to call RegisterTaskDefinition with the current service's user and password?
Thank you, Valentina

Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>