Question

  • Creator
    Topic
  • #2225794

    Vista Task Scheduler Action Editor Error

    Locked

    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 🙂

All Answers

  • Author
    Replies
    • #2620110

      Clarifications

      by tea_or_coffee ·

      In reply to Vista Task Scheduler Action Editor Error

      Clarifications

    • #2620094

      looks to me

      by rob miners ·

      In reply to Vista Task Scheduler Action Editor Error

      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.

      • #2618815

        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.

      • #2614005

        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.

        • #2614780

          That’s Great

          by rob miners ·

          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.

        • #2605959

          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. 🙂

Viewing 1 reply thread