3

How to pass multiple paramaters for Start a program action in Windows Task Scheduler for a batch file? There's no built-in syntax hint...

3
  • 1
    When I write the whole command line to "Program/script" field Scheduler auotmatically moves all arguments to an arguments field during saving the task, with all nesessary quotes... for you not so?
    – Akina
    Commented Sep 14, 2018 at 8:37
  • @Akina I haven't tried that. I'd add it as an answer if so.
    – Nae
    Commented Sep 14, 2018 at 8:46
  • Try, and if so - add it into your answer as alternative variant. One solid answer is better than 2 separate ones.
    – Akina
    Commented Sep 14, 2018 at 9:02

1 Answer 1

1

It's basically the same as how you'd pass them in command prompt:

  • Separate the arguments by space,
  • Enclose each argument with double quotes, " if metacharacters are involved

As in:

"super user:" 810934

How the Arguments Should Look Like in the Textbox


Alternatively you could simply add the arguments next to Program/script as Akina points out:

D:\my_script.bat "super user:" 810934

simply add the arguments next to <code>Program/script</code>

After selecting OK the following should be prompted:

Resolved Arguments

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .