Task Scheduler will not save to network server from remote desktop connection. Receives 0x1

0

UPDATE: Thanks, Twisty Impersonator, your suggestion below worked and it the task will now run successfully! I chose to code into the .bat to map to the network drive.

One more question? Is there a way to get the task to launch and run successfully without manually signing into the remote desktop computer? The idea is for this to run whether or not I have the ability to sign into a computer.

Thanks again!

I'm trying to use Task Scheduler to run a .bat file off a remote desktop connection. The task is completed successfully, BUT I receive an 0x1 error, and I notice that the file that is to be updated on a network server has not been updated.

If I execute the .bat file manually, the file on the network server is updated successfully.

I have mapped the network server to the remote desktop machine.

I'm wondering if I need to have the remote desktop machine added to the network servers list of trusted computers (this is not something I have permission to do, but can request it).

user1002934

Posted 2019-02-27T20:46:40.150

Reputation: 3

1What user account is being used to execute the task? Are you accessing the network server via a mapped drive or UNC path (or something else)? – I say Reinstate Monica – 2019-02-27T20:57:13.120

Hi, thanks for the response. I'm using my infocorp user account and I'm accessing the network server via a mapped drive. Thanks again! – user1002934 – 2019-02-27T22:02:02.543

Please do not only respond in the comments. Instead, [edit] the post with this information. – I say Reinstate Monica – 2019-02-28T00:24:00.837

Glad my answer worked. Regarding your new question, please ask a new question. You can ping me on this question if you'd like me to look at it. – I say Reinstate Monica – 2019-02-28T19:57:05.717

Answers

0

Programs run by the Task Scheduler don't have access to mapped drives, even if they have been previously mapped by the user whose credentials are used to run the task, with the exception of tasks configured to run in the context of a logged in user.

You have two solutions in this case:

  • Configure the scheduled task to map the drive before attempting to access it
  • Configure the task to access the network location via a UNC path name as these don't require a drive map to work

I say Reinstate Monica

Posted 2019-02-27T20:46:40.150

Reputation: 21 477