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'd like to create a scheduled task from the command line, in interactive mode. The at hh:mm /interactive program command fails, stating that security policies do not allow interactive execution.

I'd therefore like to use the schtasks command. But when I type something like

schtasks  /Create /TN MyTask /SC DAILY /ST "13:10" /TR "notepad.exe" /V1 /F

I get a message asking for my password, although I haven't set a password for my session. And when I leave the field blank, the command line answers that the task won't be able to run.

How can I fix this problem? And how can I make the task interactive? Using /RU SYSTEM prevents the task from being run in interactive mode.

Thanks! CFP.

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

Try this instead: at date -d "now + 2 minutes" +%H:%M /interactive "notepad.exe"

Of course you'll need to tweak the time and other options but this should work, starting the task under the system account by default, and interacting with the desktop.

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.