Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Jun 19 '11 at 16:43

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

1 Answer 1

up vote 3 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.