Scheduled Task Copy Script

How do I make a scheduled task and copy it to all my XP Pro networked PC's
Who is Participating?
kapesConnect With a Mentor Commented:
Or try this...

Create a schedule task on one of the XP machine...
and then copy it from " C:\WINDOWS\Tasks" folder to Destination Machine's same folder..

Here I am assuming that.. the command component you are scheduling is available on all the destination machines...

Using this kind of batch file...

First create a list of machines on which you want to schedule a task in a simple text file.. say   c:\Computers.txt

Make sure you are logged in with Admin Rights for all the destination machines, then run this script from source machine

@echo off
Set  TaskName="MyTask.job"

For /F "Tokens=1*" %%A in (c:\computers.txt) do (
Echo Copying Task %TaskName% to %%A ...
copy c:\windows\tasks\%TaskName%  \\%%A\admin$\Tasks\%TaskName% /y /v /z
set TaskName=

I assume you have admin rights on all these machines...

Then download dameware utilities... (EVAL COPY)

It allows to schedule same batch job on multiple computers...

CMILLERAuthor Commented:
Yes I have admin rights.

I cant use Dameware on the network

I found this
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

CMILLERAuthor Commented:
Why is the last "set TaskName=" blank, do I need to put the name there ?

it is to... remove the Environment Variable "TaskName"... at the end of script,... since we created it for use in script.
* Make sure computers.txt has only one computername on each line

* you have put the Task name in the first line where it says

set TaskName="myTask.job"  

replace "mytask.job" with the actual job name...
also if job name contains spaces... then we have to enclose the source and dest paths in double-quotes (")

so, change the following line

copy c:\windows\tasks\%TaskName%  \\%%A\admin$\Tasks\%TaskName% /y /v /z


copy "c:\windows\tasks\%TaskName%"   "\\%%A\admin$\Tasks\%TaskName%"  /y /v /z
CMILLERAuthor Commented:
It worked, thanks

Do you know where to point me in the right direction
to learn scripting like this?


You can go to and search for Technet Script Center... it provides lots of admin scripts...
Also Download the documentation of Windows Scripting Host... from microsoft site..

It should get you started...

Also, this is a good site for scripting...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.