0

I have created and registered a task as below

ts.RootFolder.RegisterTaskDefinition(
    taskname, 
    td,
    TaskCreation.CreateOrUpdate, 
    ConfigurationManager.AppSettings["UserName"], 
    ConfigurationManager.AppSettings["Password"], 
    TaskLogonType.InteractiveTokenOrPassword);

The problem is that when the task is executed from the task manager it keeps bringing a black "Taskeng.exe" window which opens up and closes automatically.

gunr2171
  • 16,104
  • 25
  • 61
  • 88
  • Possible duplicate of [How do I set a Windows scheduled task to run in the background?](https://stackoverflow.com/questions/6568736/how-do-i-set-a-windows-scheduled-task-to-run-in-the-background) – gunr2171 Sep 25 '19 at 15:46
  • Or https://stackoverflow.com/questions/15745195/hide-c-sharp-console-app-window-when-started-by-task-scheduler – gunr2171 Sep 25 '19 at 15:47

0 Answers0