Task Scheduler vs. User Names?

Get help for specific problems
Posts: 5
Joined: 5 Dec 2018

RoadHazard

I have one Windows 10 machine backing up files to another Windows 10 machine, using an .ffs batch file and the Windows Task Scheduler to automate the process.

I can run the FFS batch manually no problem, but it doesn't run when launched by Task Scheduler. FFS says, "Error: Cannot find the following folders..." while Task Scheduler returns ERROR_INVALID_PASSWORD.

My hunch is that it's related to usernames. My login name is different on the two machines. Let's say I'm Alice on the source machine and Bob on the target machine. As far as I can tell, Task Scheduler won't let me specify user account "Bob" because it doesn't exist on the source machine. So, what's the solution? Or am I barking up the wrong tree and the problem lies elsewhere?
User avatar
Posts: 4062
Joined: 11 Jun 2019

xCSxXenon

Are you running the task as SYSTEM? As in "Run whether this user is logged in or not"?
You have to run that unchecked since the network shares are probably mapped as letters, right?
Posts: 5
Joined: 5 Dec 2018

RoadHazard

No, I have "Run only when this user is logged in" checked.
And I use UNC syntax (that is, \\computer\folder\folder) instead of mapped drive letters.
User avatar
Posts: 4062
Joined: 11 Jun 2019

xCSxXenon

The saved credentials aren't correct by the looks of it. Open credential manager and remove the saved creds for that network resource and try reconnecting. You can edit them directly vs removing as well.
Posts: 5
Joined: 5 Dec 2018

RoadHazard

Good idea -- I hadn't thought of that.

But still no joy. Maybe I didn't remove the right entry in Credential Manager? There was no entry for the familiar name of the target machine, but there was one for its IP address, which I deleted before rebooting and trying again.
User avatar
Posts: 24
Joined: 14 Oct 2021

HimusakiMaguro

The saved credentials aren't correct by the looks of it. Open credential manager and remove the saved creds for that network resource and try reconnecting. You can edit them directly vs removing as well. xCSxXenon, 20 Oct 2021, 21:48
Can we add Service Account Credentials directly to it?
Posts: 5
Joined: 5 Dec 2018

RoadHazard

Hooray!

It took a few reboots but now it works. The magic seems to have been deleting out-of-date credentials for the target machine. On the next scheduled start, Windows popped up a box asking for my login and password for the target machine, after which FFS started right up and accessed the remote files/folders with no trouble.

Thanks for the tip!