Task Scheduler doesn't execute batch file properly

前端 未结 1 618
庸人自扰
庸人自扰 2020-12-11 08:59

I have a batch file to run a powershell program. When I double click the batch file, it runs the powershell code to

  1. generate an EXCEL spreadsheet
  2. emai
相关标签:
1条回答
  • 2020-12-11 09:37

    I had a similar problem trying to schedule a script that automates Microsoft Word. In my case, I was eventually able to work around it by setting the DCOM Identity.

    Steps

    1. Start > Run: dcomcnfg
      • If you're running 32 bit office on a 64 bit OS, use mmc comexp.msc /32
    2. Expand Component Services > Computers > My Computer > DCOM Config
    3. Find Microsoft Excel Application
    4. Right click, Properties, Identity tab.
    5. Set it to This user and put in the same credentials you put in for the scheduled task.
    0 讨论(0)
提交回复
热议问题