There is a Windows 7 PC with a scheduled task. The only thing it does is running a VBS file located on a mapped drive that points to a network share:
M: is the mapped drive.
The task is set to
Run whether user is logged in or not, and it has saved credentials for user who has access to that folder.
Now, if I select this in the dropdown:
then the task works. However if I select that:
then it fails with code
8007010B (which, as I understand it, is "Directory name is invalid"). It fails whether or not someone is logged in, and regardless of what triggered the task (the schedule or the user who
Run it manually). It also fails if I log in to the computer as the user under which the task is supposed to run and
Run it manually.
When I'm logged in as the user under which the task runs, I have access to the mapped drive and can run the script with Explorer no problem.
Apparently there is some compatibilty shim kicking in, but which one? And what do I do to make it work when 'configured for Windows 7', which should be the native mode for the computer?
I would just leave it as is, but if someone mistakenly 'upgrades' the task to the Windows 7 mode, there is no way back: the Windows XP option is then removed from the menu for that task. To have it back, one needs to export the task as XML, delete it and reimport.