PC Review


Reply
Thread Tools Rate Thread

Batch file won't run unless I'm logged on

 
 
=?Utf-8?B?RWQgRmxlY2tv?=
Guest
Posts: n/a
 
      25th Apr 2007
I have a simple batch file (using RoboCopy) that runs fine...if I'm logged on
only! I have it as a scheduled task, scheduled to repeat every day, but if
I'm logged off the box...it won't ever run and displays a "0x10" result
within scheduled task manager.

The box is: XP-Pro/SP2 with all updates.

Suggestions??? I'm stumped.

Thank you.
 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      26th Apr 2007

"Ed Flecko" <(E-Mail Removed)> wrote in message
newsC285CBA-FDF2-4FD8-91A9-(E-Mail Removed)...
> I have a simple batch file (using RoboCopy) that runs fine...if I'm logged

on
> only! I have it as a scheduled task, scheduled to repeat every day, but if
> I'm logged off the box...it won't ever run and displays a "0x10" result
> within scheduled task manager.
>
> The box is: XP-Pro/SP2 with all updates.
>
> Suggestions??? I'm stumped.
>
> Thank you.


It is highly likely that the batch file ***does*** run but
that it does not do what it should because you overlooked
a few things. Modify your batch file as follows, then have
a look at c:\test.log and all will become clear.

@echo off
echo %date% %time% Start of task > c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
robocopy /. /. /. etc. 1>>c:\test.log 2>>&1
echo ErrorLevel of robocopy=%ErrorLevel% >> c:\test.log
echo %date% %time% End of task >> c:\test.log

If you still have a problem, show us your batch file!


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A script/batch to kill a batch file from scheduled tasks? Bogdan Windows XP Configuration 1 31st Jul 2009 06:05 AM
batch file call from a macro - how ? and required batch format VB-rookie Microsoft Excel Programming 3 5th Sep 2008 10:33 PM
re: Finding the currently logged on user via batch? fu.yeun@gmail.com Microsoft Windows 2000 2 10th Apr 2007 10:57 PM
Save batch window msgs to a file from the batch prog Stephen Rainey Windows XP General 3 10th Jan 2007 12:50 AM
Run shutdown.exe in batch file while logged off doesn't work? Craig Windows XP Security 0 2nd Jul 2003 01:43 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:20 PM.