2

I've been browsing the docs of schtasks command and I didn't find any equivalent to the checkbox "Execute with maximum privileges" (rough translation here, sorry) in the scheduled task admin windows GUI (and /RU SYSTEM doesn't achieve it).

Do you know if there is such an option with schtasks? If so, which Windows versions can benefit from it?

Thanks a lot for your help!

Rolf

fbiville
  • 8,407
  • 7
  • 51
  • 79

1 Answers1

2

You will not find such thing because there is no such thing like maximum privileges. You must specify a user credential which has enough privileges to perform the task.

Failing to do so will cause the execution of scheduled task fail.

Here is the answer to execute the task with specified level of privileges.

https://superuser.com/questions/243605/how-do-i-specify-run-with-highest-privileges-in-schtasks

Community
  • 1
  • 1
Murtuza Kabul
  • 6,438
  • 6
  • 27
  • 34
  • 1
    Hi, thanks for your answer. However, why does the Windows administration GUI offer such an option, then? – fbiville Oct 09 '12 at 15:01
  • This is to circumvent windows features which explicitly asks for user permission to do system related changes. – Murtuza Kabul Oct 09 '12 at 15:02
  • 1
    And why wouldn't there be a way to achieve this with `schtasks`? – fbiville Oct 09 '12 at 15:13
  • All I want is for the user to not have to check the "Execute with maximum privileges" checkbox (see scheduled tasks admin panel), I want it already checked after the scheduled task creation with `schtasks` (or any equivalent script). – fbiville Oct 09 '12 at 15:16
  • Sorry, I misinterpreted your question. Here is your answer - http://superuser.com/questions/243605/how-do-i-specify-run-with-highest-privileges-in-schtasks – Murtuza Kabul Oct 09 '12 at 15:20
  • can we use that for each version of Windows (from XP to 7 or 8, including Windows Server 2008) ? – fbiville Oct 09 '12 at 15:23
  • I am not sure about it, but if it is available on XP, it should be available on the later versions also. – Murtuza Kabul Oct 09 '12 at 15:26