Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with xcopy in Scheduled Task

422 views
Skip to first unread message

jgfa9

unread,
Oct 4, 2006, 6:02:19 AM10/4/06
to
Hi,
I've already saw messages related to this problem but none solved mine
:
I have a batch file which source code is :

xcopy /Y /S C:\source.txt \\my_server\dest.txt

If I run this script manually (double-click), it works : the file is
copied.

If I try to make it run with the Windows Scheduled Task, it fails the
both ways I tried :
- if I specifY "System" in the "run as" field in the task property
window ("NT AUTHORITY\SYSTEM" is then written automatically), the task
seems to run but the "last result" indicates "0x4" and the file is not
copied.
- if I specify "Administrator" ("INTRANET\ADMINISTRATOR" put
automatically) (Administrator has full rights, I am logged as
Administrator on the local machine AND on the remote one), I have the
"could not start" status and obviously the file is not copied.

What am I missing ? Can somebody help me ?

Thanks in advance.

Pegasus (MVP)

unread,
Oct 4, 2006, 9:07:45 AM10/4/06
to

"jgfa9" <julie....@gmail.com> wrote in message
news:1159956138....@i42g2000cwa.googlegroups.com...

You cannot run this job under the System account because
the System account has no access to networked resources.

You should not run it under the Administrator account
either because the job will pop into the foreground during
interactive Administrator sessions. There are also problems
with changing passwords.

You should create a dedicated Schedule account with
suitable access to networked resources. Furthermore you
must allow this dedicated account to log on as a batch job.
Run gpedit.msc, then follow this path:
Local Computer Policy / Computer Configuration / Windows Settings /
Security Settings / Local Policy / User Rights / Logon as a batch job.


jgfa9

unread,
Oct 5, 2006, 11:27:53 AM10/5/06
to
It works ! Thanks a lot !!!
0 new messages