DOS batch file cannot run by scheduler in brand new WindowsXP



**johnnykeung**
07-09-2005, 11:43 PM
Hi all,
I'm not sure this is the right place to post the question, if not please
tell me.

I have an installation of our company software on a brand new WinXP SP2

I have a situation that need to use dos batch to move file from a network
drive to local drive for process, I can run the batch successfully.

After that create the schedule to run the batch, but that is nothing happen,
even I generate a new user with administrator right (local) for that is still
the same.

After I go back to office I found another WinXP SP2 and do the same thing,
that is no problem at all.

Please advice what is the problem and how to fix it.

Jon
07-09-2005, 11:43 PM
Does the account have a password? By default, you need to use an account
that has a password set up, and to enter the password when scheduling the
task.

Jon


"**johnnykeung**" <johnnykeung@discussions.microsoft.com> wrote in message
news:896FBE32-7AE7-4980-B7EB-5F0069E51773@microsoft.com...
> Hi all,
> I'm not sure this is the right place to post the question, if not please
> tell me.
>
> I have an installation of our company software on a brand new WinXP SP2
>
> I have a situation that need to use dos batch to move file from a network
> drive to local drive for process, I can run the batch successfully.
>
> After that create the schedule to run the batch, but that is nothing
> happen,
> even I generate a new user with administrator right (local) for that is
> still
> the same.
>
> After I go back to office I found another WinXP SP2 and do the same thing,
> that is no problem at all.
>
> Please advice what is the problem and how to fix it.

Pegasus \(MVP\)
07-09-2005, 11:43 PM
"**johnnykeung**" <johnnykeung@discussions.microsoft.com> wrote in message
news:896FBE32-7AE7-4980-B7EB-5F0069E51773@microsoft.com...
> Hi all,
> I'm not sure this is the right place to post the question, if not please
> tell me.
>
> I have an installation of our company software on a brand new WinXP SP2
>
> I have a situation that need to use dos batch to move file from a network
> drive to local drive for process, I can run the batch successfully.
>
> After that create the schedule to run the batch, but that is nothing
happen,
> even I generate a new user with administrator right (local) for that is
still
> the same.
>
> After I go back to office I found another WinXP SP2 and do the same thing,
> that is no problem at all.
>
> Please advice what is the problem and how to fix it.

This is probably a permissions issue. Embed your copy command
in the following batch file, then run it via the Task Scheduler.

@echo off
echo %date% %time% Start of task > c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
xcopy.exe /y /c /s "SourceFolder\*.txt" "TargetFolder\" 1>>c:\test.log
2>c:\test.err
echo ErrorLevel of xcopy.exe=%ErrorLevel% >> c:\test.log
echo %date% %time% End of task >> c:\test.log

Now have a look at the two log files and all will become clear.
By the way - there is no "DOS" under Windows XP. DOS is
an operating system. You probably mean the Command Prompt.

**johnnykeung**
07-09-2005, 11:47 PM
thanks for reply,

I put DOS in the message, because I need to create a clear picture that is
not vbscript or javascript, that is pure DOS command.

I have mentioned that I have created a new user with Administrator group and
assigned in the schedule, that is the same result.

Is it the problem from SP2? firewall?(I have disabled) or still have any
other setting to disable the WINXP SP2 run DOS batch.

Cheers,

"Pegasus (MVP)" wrote:

>
> "**johnnykeung**" <johnnykeung@discussions.microsoft.com> wrote in message
> news:896FBE32-7AE7-4980-B7EB-5F0069E51773@microsoft.com...
> > Hi all,
> > I'm not sure this is the right place to post the question, if not please
> > tell me.
> >
> > I have an installation of our company software on a brand new WinXP SP2
> >
> > I have a situation that need to use dos batch to move file from a network
> > drive to local drive for process, I can run the batch successfully.
> >
> > After that create the schedule to run the batch, but that is nothing
> happen,
> > even I generate a new user with administrator right (local) for that is
> still
> > the same.
> >
> > After I go back to office I found another WinXP SP2 and do the same thing,
> > that is no problem at all.
> >
> > Please advice what is the problem and how to fix it.
>
> This is probably a permissions issue. Embed your copy command
> in the following batch file, then run it via the Task Scheduler.
>
> @echo off
> echo %date% %time% Start of task > c:\test.log
> echo User=%UserName%, Path=%path% >> c:\test.log
> xcopy.exe /y /c /s "SourceFolder\*.txt" "TargetFolder\" 1>>c:\test.log
> 2>c:\test.err
> echo ErrorLevel of xcopy.exe=%ErrorLevel% >> c:\test.log
> echo %date% %time% End of task >> c:\test.log
>
> Now have a look at the two log files and all will become clear.
> By the way - there is no "DOS" under Windows XP. DOS is
> an operating system. You probably mean the Command Prompt.
>
>
>


DOS batch file cannot run by scheduler in brand new WindowsXP