Jump to content

Task Scheduler privilege problem?


Recommended Posts

Guest Peter
Posted

Hi,

 

I have a batch file (.bat) which contains an XCOPY command, to copy

files from one PC to another on the workgroup at 17:00 every day.

 

The batch file works perfectly when run manually (from the DOS box).

 

However when I activate the batch file from the task scheduler, the AT

command, it runs OK (as evident from some other stuff in it) but the

XCOPY command never gets run or, more precisely, the files never get

copied over.

 

Both PCs have the same login/pwd combination for the login (an

administrator login), so there is automatic login when doing any

manual file copy ops etc.

 

However the task scheduler is running under some sort of local account

and I wonder if this has insufficient privileges to do the file copy.

 

I've tried to make the task scheduler run as the administrator login

but it refuses to start, saying that some other stuff it is tied into

doesn't have the same rights.

 

How can I solve this problem?

 

Thank you for any suggestions...

 

 

x----------x

  • Replies 3
  • Created
  • Last Reply
Guest Pegasus \(MVP\)
Posted

Re: Task Scheduler privilege problem?

 

 

"Peter" <peter@address-in-sig00000.co.uk> wrote in message

news:7ooo2450dv60s5vca11omtsml7138mukf9@4ax.com...

> Hi,

>

> I have a batch file (.bat) which contains an XCOPY command, to copy

> files from one PC to another on the workgroup at 17:00 every day.

>

> The batch file works perfectly when run manually (from the DOS box).

>

> However when I activate the batch file from the task scheduler, the AT

> command, it runs OK (as evident from some other stuff in it) but the

> XCOPY command never gets run or, more precisely, the files never get

> copied over.

>

> Both PCs have the same login/pwd combination for the login (an

> administrator login), so there is automatic login when doing any

> manual file copy ops etc.

>

> However the task scheduler is running under some sort of local account

> and I wonder if this has insufficient privileges to do the file copy.

>

> I've tried to make the task scheduler run as the administrator login

> but it refuses to start, saying that some other stuff it is tied into

> doesn't have the same rights.

>

> How can I solve this problem?

>

> Thank you for any suggestions...

>

>

> x----------x

 

I sense a contradiction in your post. Are you using the Task

Scheduler (via the Control Panel) to schedule your task or

are you using at.exe? You mention both - yet they are

completely different beasts!

 

Also - let's have a look at your batch file.

Guest Peter
Posted

Re: Task Scheduler privilege problem?

 

 

"Pegasus \(MVP\)" <I.can@fly.com.oz> wrote:

>

>"Peter" <peter@address-in-sig00000.co.uk> wrote in message

>news:7ooo2450dv60s5vca11omtsml7138mukf9@4ax.com...

>> Hi,

>>

>> I have a batch file (.bat) which contains an XCOPY command, to copy

>> files from one PC to another on the workgroup at 17:00 every day.

>>

>> The batch file works perfectly when run manually (from the DOS box).

>>

>> However when I activate the batch file from the task scheduler, the AT

>> command, it runs OK (as evident from some other stuff in it) but the

>> XCOPY command never gets run or, more precisely, the files never get

>> copied over.

>>

>> Both PCs have the same login/pwd combination for the login (an

>> administrator login), so there is automatic login when doing any

>> manual file copy ops etc.

>>

>> However the task scheduler is running under some sort of local account

>> and I wonder if this has insufficient privileges to do the file copy.

>>

>> I've tried to make the task scheduler run as the administrator login

>> but it refuses to start, saying that some other stuff it is tied into

>> doesn't have the same rights.

>>

>> How can I solve this problem?

>>

>> Thank you for any suggestions...

>>

>>

>> x----------x

>

>I sense a contradiction in your post. Are you using the Task

>Scheduler (via the Control Panel) to schedule your task or

>are you using at.exe? You mention both - yet they are

>completely different beasts!

>

>Also - let's have a look at your batch file.

>

 

I am using the AT command. (winXP)

 

The batch file is in c:\bats and is invoked by the AT command using

its full path including filetype.

 

The batch file contains a little specially written program (.exe)

which sends some strings out of COM1 which go to a modem which

switches our PABX between day and night mode.

 

The batch file also contains the XCOPY command line.

 

You say the two are different. On the PC I am writing this on

(win2000) I have a AT command set to copy a load of files at 3am every

day to a network drive. If I go to the Scheduled Tasks in Control

Panel, I see the same thing in there. It's just a different user

interface onto the same thing. The only thing is that the task created

by AT cannot be edited in the CP applet - everything is greyed out.

 

It must be a privileges issue; if the batch file is run interactively

from the console, it all runs, but if run by the task scheduler the

XCOPY operation does nothing. I will try to prove this by copying the

files to the same machine....

x----------x

Guest Pegasus \(MVP\)
Posted

Re: Task Scheduler privilege problem?

 

See below.

 

"Peter" <peter@address-in-sig00000.co.uk> wrote in message

news:i4kq241ao2dsn8c6j72pqn1ijs9ecpkhl2@4ax.com...

>

> "Pegasus \(MVP\)" <I.can@fly.com.oz> wrote:

>

>>

>>"Peter" <peter@address-in-sig00000.co.uk> wrote in message

>>news:7ooo2450dv60s5vca11omtsml7138mukf9@4ax.com...

>>> Hi,

>>>

>>> I have a batch file (.bat) which contains an XCOPY command, to copy

>>> files from one PC to another on the workgroup at 17:00 every day.

>>>

>>> The batch file works perfectly when run manually (from the DOS box).

>>>

>>> However when I activate the batch file from the task scheduler, the AT

>>> command, it runs OK (as evident from some other stuff in it) but the

>>> XCOPY command never gets run or, more precisely, the files never get

>>> copied over.

>>>

>>> Both PCs have the same login/pwd combination for the login (an

>>> administrator login), so there is automatic login when doing any

>>> manual file copy ops etc.

>>>

>>> However the task scheduler is running under some sort of local account

>>> and I wonder if this has insufficient privileges to do the file copy.

>>>

>>> I've tried to make the task scheduler run as the administrator login

>>> but it refuses to start, saying that some other stuff it is tied into

>>> doesn't have the same rights.

>>>

>>> How can I solve this problem?

>>>

>>> Thank you for any suggestions...

>>>

>>>

>>> x----------x

>>

>>I sense a contradiction in your post. Are you using the Task

>>Scheduler (via the Control Panel) to schedule your task or

>>are you using at.exe? You mention both - yet they are

>>completely different beasts!

>>

>>Also - let's have a look at your batch file.

>>

>

> I am using the AT command. (winXP)

>

> The batch file is in c:\bats and is invoked by the AT command using

> its full path including filetype.

>

> The batch file contains a little specially written program (.exe)

> which sends some strings out of COM1 which go to a modem which

> switches our PABX between day and night mode.

>

> The batch file also contains the XCOPY command line.

>

> You say the two are different. On the PC I am writing this on

> (win2000) I have a AT command set to copy a load of files at 3am every

> day to a network drive. If I go to the Scheduled Tasks in Control

> Panel, I see the same thing in there. It's just a different user

> interface onto the same thing. The only thing is that the task created

> by AT cannot be edited in the CP applet - everything is greyed out.

>

> It must be a privileges issue; if the batch file is run interactively

> from the console, it all runs, but if run by the task scheduler the

> XCOPY operation does nothing. I will try to prove this by copying the

> files to the same machine....

> x----------x

 

At.exe is a legacy command dating back to Windows NT 4.0.

Windows 2000/XP has the Task Scheduler which offers far

better functionality, including the ability to specify a user name

& password to run the task. This is what you should use - it

will solve all your problems.


×
×
  • Create New...