Batch file problem

  • Thread starter Thread starter Glenn Clark
  • Start date Start date
G

Glenn Clark

Guest
Hi All

I have a couple of batch files setup for the admin account but seem to be
having a problem. Both these batches deal with data on a permanently mapped
drive. 1 remanes some file and deletes some and the other creates pst files.

If I login as admin and run the batch files they work fine with no problems
but if I use the schedule set to run under admin they say running in the
scheduler but don't do anything.

Anyone got any ideas

Cheers glenn
 
Re: Batch file problem


"Glenn Clark" <NOSPAMPLEASEglenn.btn@gmail.comNOSPAMPLEASE> wrote in message
news:eawoQi2LJHA.728@TK2MSFTNGP03.phx.gbl...
> Hi All
>
> I have a couple of batch files setup for the admin account but seem to be
> having a problem. Both these batches deal with data on a permanently
> mapped drive. 1 remanes some file and deletes some and the other creates
> pst files.
>
> If I login as admin and run the batch files they work fine with no
> problems but if I use the schedule set to run under admin they say running
> in the scheduler but don't do anything.
>
> Anyone got any ideas
>
> Cheers glenn


Let's have a look at your batch files!
 
Re: Batch file problem

Scheduled Tasks|Advanced|View Log may provide some details. If the job
connects to another machine you may need to add the user/ group 'logon as
batch job' rights (server side). Control Panel|Admin Tools|Local Security
Policy\Local Policies\User Rights Assignments
"Log on as a batch job"

If the task completes but the job does not then there is a problem in the
job itself. Remember that if it involves network resources to make sure the
user account has permissions to the resources and also use UNC paths as
mapped drives won't natively exist when no one is logged on.



--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


"Glenn Clark" wrote:
> Hi All
>
> I have a couple of batch files setup for the admin account but seem to be
> having a problem. Both these batches deal with data on a permanently
> mapped drive. 1 remanes some file and deletes some and the other creates
> pst files.
>
> If I login as admin and run the batch files they work fine with no
> problems but if I use the schedule set to run under admin they say running
> in the scheduler but don't do anything.
>
> Anyone got any ideas
>
> Cheers glenn
>
 
Re: Batch file problem

Post thr Batch File, but if you´re using "%" in some commands (like "FOR")
you have to use "%%" insted

"Glenn Clark" <NOSPAMPLEASEglenn.btn@gmail.comNOSPAMPLEASE> escreveu na
mensagem news:eawoQi2LJHA.728@TK2MSFTNGP03.phx.gbl...
> Hi All
>
> I have a couple of batch files setup for the admin account but seem to be
> having a problem. Both these batches deal with data on a permanently
> mapped drive. 1 remanes some file and deletes some and the other creates
> pst files.
>
> If I login as admin and run the batch files they work fine with no
> problems but if I use the schedule set to run under admin they say running
> in the scheduler but don't do anything.
>
> Anyone got any ideas
>
> Cheers glenn
>
 
Re: Batch file problem

Glenn Clark wrote:
> Hi All
>
> I have a couple of batch files setup for the admin account but seem to be
> having a problem. Both these batches deal with data on a permanently mapped
> drive. 1 remanes some file and deletes some and the other creates pst files.
>
> If I login as admin and run the batch files they work fine with no problems
> but if I use the schedule set to run under admin they say running in the
> scheduler but don't do anything.
>
> Anyone got any ideas
>
> Cheers glenn
>
>


If you are trying to use mapped drives, this can be a problem. If you
are running a scheduled task using a batch file, always point to the
mapped drive by it's UNC name (\<servername>\.....). Don't use drive
letters.

--

Regards,
Hank Arnold
Microsoft MVP
Windows Server - Directory Services
 
RE: Batch file problem

If the batch files are invoked from a certain path, you have to specify the
path in the "Start in" property of the scheduled task.

--
Salvador Manaois III
MCSE MCSA CEH MCITP | Enterprise/Server Admin
Bytes & Badz : http://badzmanaois.blogspot.com


"Glenn Clark" wrote:

> Hi All
>
> I have a couple of batch files setup for the admin account but seem to be
> having a problem. Both these batches deal with data on a permanently mapped
> drive. 1 remanes some file and deletes some and the other creates pst files.
>
> If I login as admin and run the batch files they work fine with no problems
> but if I use the schedule set to run under admin they say running in the
> scheduler but don't do anything.
>
> Anyone got any ideas
>
> Cheers glenn
>
>
>
 
Back
Top