I ran into some interesting behavior with the Windows Task Scheduler on a Windows Server 2008 R2 box.

When I setup my schedule I had to specify the “Start in (optional)” path because my app needed to access some folders local to the app. Every time I tried to run the job it would get the error “The directory name is invalid. (0x8007010B).

I thought I had a typo in the “Start in (optional)” field, but it looked correct to me:

"C:\Program Files\Whatever\"

Then I thought the trailing backslash was causing the issue, but removing it still resulted in the error message.

After consulting Google I found out that the quotes around the file path cause the problem. For some reason the “Start in (optional)” field can’t handle quotes.

I removed the quotes and it worked like a charm with or without the trailing backslash.

TaskScheduler

facebooktwittergoogle_plusredditpinterestlinkedinmail