Question

Locked

Vista Task Scheduler Action Editor Error

By Tea_or_Coffee ·
Windows Vista has a promising new task scheduler with lots of controls and more power. I particularly like the way you can batch commands under one task.

It was editing one such batch that I came across what I think is an error.

When you edit an action (Run a File) you put the path to the executable file in one box and the command line arguments in another, viz:

Program: [c:\Program Files\Folder\program.exe]
Commmand line: [-r "dothis"]

However, when you save this it says you have made an error by putting too much in the command line box and asks for confirmation:

Program: [c:\Program ]
Command line:
[Files\Folder\program.exe-r "dothis"]

It is clearly being confused by the space between 'Program' and 'Files'. I would have thought by now MS coders would be aware that this is the moast likely place to run a program from! :-)

The age-old way of getting round this is to put quotes around the path, but it didn't seem right.

I hope someone could throw some light on how they solved this problem. Thanks :-)

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

looks to me

by Jacky Howe In reply to Vista Task Scheduler Acti ...

that they solved it by using quotes. If you setup a new task and browse to the .exe when you select it, it adds the quotes. You could probably use %ProgramFiles% in a batch file.

Collapse -

tried it

by Tea_or_Coffee In reply to looks to me

Thank you fargone... I tried %programfiles% but it didn't work. I'll have another go with quotes but something spooked me about quotes and I cant remember what.

Collapse -

Quotes work

by Tea_or_Coffee In reply to looks to me

This time the quotes work!

What is not clear about the way this part of Vista works, when asks you to confirm that the command is;

C:\Program

with

Files/someprogram.exe -k Somecommand

as the attributes all you hav to do is cancel and it wraps the quotes around the right bits.

Collapse -

That's Great

by Jacky Howe In reply to Quotes work

From what I can see if you use the Create Basic Task Wizard you give the Task a Name and Description and select next you are then able to select when it starts and select next. Select start a Program. Browse to the Program that you want to start and select Open. It should automatically add the Quotes.

Collapse -

If you use the Vista interface

by Tea_or_Coffee In reply to That's Great

Yes, mate,

I got confused because the task was created by the application that gets called. I just went in to the Windows interface to edit it.

Anyway it's sorted now. Thanks very much for your help. :-)

Back to Windows Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums