Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create a scheduled task from command line, although I can create in fine when defining the executable, I have problems when trying to add a parameter for that executable:

schtasks /Create /SC DAILY /TN TestRun /TR "C:\Program Files\Test\test.exe" C:\

I am effectively trying to launch "test.exe C:\"

share|improve this question

migrated from Jun 19 '11 at 16:43

This question came from our site for professional and enthusiast programmers.

up vote 4 down vote accepted
schtasks /Create /SC DAILY /TN TestRun /TR "'C:\Program Files\Test\test.exe' 'C:\'"

You can read details in help:

schtasks /Create /? 
share|improve this answer
Thanks you – James Jun 19 '11 at 14:23

You must log in to answer this question.