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).

4
  • 1
    What 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)? Commented Feb 27, 2019 at 20:57
  • 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! Commented Feb 27, 2019 at 22:02
  • Please do not only respond in the comments. Instead, edit the post with this information. Commented Feb 28, 2019 at 0:24
  • 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. Commented Feb 28, 2019 at 19:57

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .