Application throws an error when launched from task scheduler

前端 未结 3 1786
时光说笑
时光说笑 2021-01-25 21:17

I have a custom application which uses Microsoft.Office.Interop.Excel.Application to open and save excel file. I have a batch which fires the app with all the required parameter

3条回答
  •  鱼传尺愫
    2021-01-25 22:07

    Actually I haven't tried the answer by @Maju but this Superuser question has a solution which worked for me: you have to config DCOM. I set the identity to run Excel to the identity which I'm using in the Task Scheduler.

    https://superuser.com/questions/579900/why-cant-excel-open-a-file-when-run-from-task-scheduler

提交回复
热议问题