0

Here is my problem: I made a task in the Task scheduler triggered by a specific event. This task, execute a small bat file. When the bat file is located on the local drive of the pc, no problem, it runs fine but what I want to do is put the bat file on a shared drive on my network. The assistant accepts the UNC path (something like \\FileServer\tasks\myTask.bat) but the bat file is never executed.

If I try to execute it manually (with a cmb box), it runs.

Is it a known constraint? How can I deal with it?

ANSWER: My bad, a colleague checked my work and saw I checked the box "do not store password. the task will only have access to local resources"

I didn't read properly the end :(

4
  • Is the FileServer marked as trusted host in the IE settings? This can have an impact. Also please remember that you can't change directory to an UNC path (only to an UNC share that is mounted as drive letter).
    – Robert
    Mar 22, 2013 at 14:45
  • Yes it is, I can execute an other application who had this issue too. The bat file launch a perl file (in the same directory, path fixed) and the perl file creates a file on the C:\ drive.
    – el_grom
    Mar 22, 2013 at 14:58
  • You should move your answer out of the question and add it as an answer. You can even mark it as accepted after a time period Mar 28, 2013 at 0:33
  • It was already done ;-)
    – el_grom
    Mar 28, 2013 at 7:55

2 Answers 2

0

The account that you have set to run the task has to have permissions to the network share that the batch file is saved on.

If you're not specifying an account to run the scheduled task it won't have access to network resources. It works when you run it manually because the user you're logged in as has the necessary network access.

If you're on Windows 7 the option will look like this:

enter image description here

Just click on "Change User or Group..." to set the account with the proper access.

1
  • The user used is mine and I'm part of the administrators of the machine.
    – el_grom
    Mar 22, 2013 at 14:58
0

My bad, a colleague checked my work and saw I checked the box "do not store password. the task will only have access to local resources"

I didn't read properly the end :(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.