why windows 7 task scheduler task fails with error 2147942667

后端 未结 7 636
粉色の甜心
粉色の甜心 2021-01-30 01:38

I am facing a strange problem. I have scheduled a task to lauch a batch file. When I run the task with option Run only when user is logged on everything works fine.

7条回答
  •  温柔的废话
    2021-01-30 01:55

    I had this same issue.

    The solution for me was found in the Microsoft KB Article 2452723:

    Windows Vista onwards scheduled tasks fail to run if the path in "Start in (Optional)" field has quotes

    Basically, edit your scheduled task and take the Quotes out of the Start In field:

    1. Open your Scheduled Task
    2. Switch to "Actions" tab
    3. Open your Action
    4. Remove Quotes (") from the field "Start in (optional)"
    5. Save and close all open dialogs

    Edit Action Dialog Box

    To get the relevant error message:

    1) Convert 2147942667 to hex: 8007010B
    2) Take last 4 digits (010B) and convert to decimal: 267
    3) Run: net helpmsg 267
    4) Result: "The directory name is invalid."

提交回复
热议问题