Question Locked

Vista Task Scheduler Action Editor Error

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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 :-)

6 replies

by rob miners

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.

by tea_or_coffee

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.

by tea_or_coffee

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.

by rob miners

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.

by tea_or_coffee

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. :-)

This discussion is closed to new replies.