Help!

Vista Task Scheduler can't run OK *.BAT file

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Account Administration RSS
Next:  Not Enough Privileges;  
Author Message
Ron A. Zajac
External


Since: Jul 14, 2007
Posts: 1



PostPosted: Sat Jul 14, 2007 8:52 pm    Post subject: Vista Task Scheduler can't run OK *.BAT file
Archived from groups: microsoft>public>windows>vista>administration_accounts_passwords (more info?)

Pretty straight up situation.

I have a batch file:

"C:\TclStuff\Batch Files\PlaySomething.bat" Annie

This runs on a command line just fine. It won't run from the Task Scheduler:

Task Scheduler failed to start instance
"{DA573AEA-805C-4477-8152-53B595EF95C9}" of "\Wake for Annie" task for user
"a-PC\Ron A. Zajac" . Additional Data: Error Value: 2147942667.

What gives?
Back to top
Ronnie Vernon MVP
External


Since: Jan 09, 2007
Posts: 1325



PostPosted: Sun Jul 15, 2007 3:01 pm    Post subject: Re: Vista Task Scheduler can't run OK *.BAT file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Ron

In the Task Scheduler for this task, do you have the "Run with highest
privileges" option enabled in the General Tab?

--

Ronnie Vernon
Microsoft MVP
Windows Shell/User


"Ron A. Zajac" <Ron A. Zajac.RemoveThis@discussions.microsoft.com> wrote in message
news:9092888C-2D17-417C-B3E6-E87D5034B8DE@microsoft.com...
> Pretty straight up situation.
>
> I have a batch file:
>
> "C:\TclStuff\Batch Files\PlaySomething.bat" Annie
>
> This runs on a command line just fine. It won't run from the Task
> Scheduler:
>
> Task Scheduler failed to start instance
> "{DA573AEA-805C-4477-8152-53B595EF95C9}" of "\Wake for Annie" task for
> user
> "a-PC\Ron A. Zajac" . Additional Data: Error Value: 2147942667.
>
> What gives?
>
>
Back to top
Ron A. Zajac
External


Since: Jul 15, 2007
Posts: 2



PostPosted: Sun Jul 15, 2007 4:32 pm    Post subject: Re: Vista Task Scheduler can't run OK *.BAT file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Ronnie,

Thanks for the suggestion.

No, this option wasn't enabled. I enabled it, then issued a "Run" order
again to test it. It didn't work. Here's the formatted ("friendly") Details
ouput:

- System

- Provider

[ Name] Microsoft-Windows-TaskScheduler
[ Guid] {de7b24ea-73c8-4a09-985d-5bdadcfa9017}

EventID 203

Version 0

Level 2

Task 203

Opcode 101

Keywords 0x8000000000000000

- TimeCreated

[ SystemTime] 2007-07-16T10:56:30.270Z

EventRecordID 2891

- Correlation

[ ActivityID] {E60BD601-7B36-4973-9586-316BC088C6A9}

- Execution

[ ProcessID] 4916
[ ThreadID] 7592

Channel Microsoft-Windows-TaskScheduler/Operational

Computer a-PC

- Security

[ UserID] S-1-5-21-1865275644-502863341-2745678560-1001


- EventData

TaskName \Wake for Annie
TaskInstanceId {E60BD601-7B36-4973-9586-316BC088C6A9}
ActionName C:\Windows\SYSTEM32\cmd.exe
ResultCode 2147942667


I could mention the fact that the *.BAT has a header that runs another
interpreter (tclsh). However, I feel this is likely a non-issue; if I can
run it from a command line, why shouldn't the Scheduler be able to run it?
On the off-chance it had something to do with the $path$, I quickly modified
that header to invoke the tclsh using the full path (c:\Tcl\bin\tclsh); no
dice.

Again, thanks for your kind ministrations! If another angle occurs to
you, please keep me posted!

-raz (Ron A. Zajac)

"Ronnie Vernon MVP" wrote:

> Ron
>
> In the Task Scheduler for this task, do you have the "Run with highest
> privileges" option enabled in the General Tab?
>
> --
>
> Ronnie Vernon
> Microsoft MVP
> Windows Shell/User
>
>
> "Ron A. Zajac" <Ron A. Zajac RemoveThis @discussions.microsoft.com> wrote in message
> news:9092888C-2D17-417C-B3E6-E87D5034B8DE@microsoft.com...
> > Pretty straight up situation.
> >
> > I have a batch file:
> >
> > "C:\TclStuff\Batch Files\PlaySomething.bat" Annie
> >
> > This runs on a command line just fine. It won't run from the Task
> > Scheduler:
> >
> > Task Scheduler failed to start instance
> > "{DA573AEA-805C-4477-8152-53B595EF95C9}" of "\Wake for Annie" task for
> > user
> > "a-PC\Ron A. Zajac" . Additional Data: Error Value: 2147942667.
> >
> > What gives?
> >
> >
>
Back to top
Jimmy Brush
External


Since: May 11, 2007
Posts: 352



PostPosted: Mon Jul 16, 2007 4:37 am    Post subject: Re: Vista Task Scheduler can't run OK *.BAT file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

<snip>
> TaskName \Wake for Annie
> TaskInstanceId {E60BD601-7B36-4973-9586-316BC088C6A9}
> ActionName C:\Windows\SYSTEM32\cmd.exe
> ResultCode 2147942667
</snip>

Hello,

If it helps at all, that result code translates into this Win32 error code:

Error # 267 (ERROR_DIRECTORY)
The directory name is invalid.

- JB
Back to top
Ron A. Zajac
External


Since: Jul 15, 2007
Posts: 2



PostPosted: Mon Jul 16, 2007 7:34 am    Post subject: Re: Vista Task Scheduler can't run OK *.BAT file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jimmy,

I guess that tell me something: You're saying that the cmd.exe is
returning that error code? It still raises the question: Why would the
manual run of the script go OK, whereas running it under the auspices of the
Task Scheduler results in some kind of a directory path-related offense
against the cmd.exe? Shouldn't the Task Scheduler--running "as" me--have the
same environment as I do?

Oh: And a sincere thanks for your interest!

-raz

"Jimmy Brush" wrote:

> <snip>
> > TaskName \Wake for Annie
> > TaskInstanceId {E60BD601-7B36-4973-9586-316BC088C6A9}
> > ActionName C:\Windows\SYSTEM32\cmd.exe
> > ResultCode 2147942667
> </snip>
>
> Hello,
>
> If it helps at all, that result code translates into this Win32 error code:
>
> Error # 267 (ERROR_DIRECTORY)
> The directory name is invalid.
>
> - JB
>
>
Back to top
Jimmy Brush
External


Since: May 11, 2007
Posts: 352



PostPosted: Tue Jul 17, 2007 3:21 am    Post subject: Re: Vista Task Scheduler can't run OK *.BAT file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Ron A. Zajac wrote:
> Jimmy,
>
> I guess that tell me something: You're saying that the cmd.exe is
> returning that error code? It still raises the question: Why would the
> manual run of the script go OK, whereas running it under the auspices of the
> Task Scheduler results in some kind of a directory path-related offense
> against the cmd.exe? Shouldn't the Task Scheduler--running "as" me--have the
> same environment as I do?
>
> Oh: And a sincere thanks for your interest!
>

I'm not really sure.

Is your account an administrator account, or do you run as a standard
user and elevate to a seperate admin account?

Can you export your task to an xml file and then post the contents of
that file so we can have a look?

- JB
Back to top
hexago
External


Since: Jul 31, 2007
Posts: 1



PostPosted: Tue Jul 31, 2007 2:30 pm    Post subject: Re: Vista Task Scheduler can't run OK *.BAT file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jul 16, 10:37 am, Jimmy Brush <j....DeleteThis@mvps.org> wrote:
> <snip>> TaskName \Wake for Annie
> > TaskInstanceId {E60BD601-7B36-4973-9586-316BC088C6A9}
> > ActionName C:\Windows\SYSTEM32\cmd.exe
> > ResultCode2147942667
>
> </snip>
>
> Hello,
>
> If it helps at all, that result code translates into this Win32errorcode:
>
> Error# 267 (ERROR_DIRECTORY)
> The directory name is invalid.
>
> - JB

I had the same problem. I had to remove the quotation marks in the
Start in field.

Changed from "C.\Program Files\" to C.\Program Files\
Back to top
jjman
External


Since: Sep 25, 2009
Posts: 1



PostPosted: Fri Sep 25, 2009 4:49 pm    Post subject: Re: Vista Task Scheduler can't run OK *.BAT file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Brilliant! hexago DeleteThis @gmail.com you save me from more hours of pulling my
hair out.
Very HappyVery Happy:D


--
jjman
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Account Administration All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum