none
Schtasks permissions? RRS feed

  • Question

  • Hi everbody,

     I'm a programmer making a software that is divided in two pieces: a taskbar notifier icon and a scheduled task.

    When the scheduled tasks runs (every 30 minutes) the taskbar icon notifies it to the user. Also the notifier icon has a "run now" button to run the scheduled task on demand by executing a "schtasks /run /tn MyTaskName" command in the background.

    This software works fine under Windows 7 by setting "read" and "execution" permissions to "everybody" in C:\windows\System32\Task\MyTaskName

    But in Windows 10 the "schtasks /run /tn MyTaskName" fails with an "access denied" error message.

    What must I do to set the appropiate permissions in Windows 10?

    Thank you very much!

    Wednesday, August 24, 2016 12:53 PM

All replies

  • Hi,

    As we know, Windows 10 make progress on system security, this point may influence your software, I think we can try give full control permission to everyone in the Task path you mentioned. Also, give full control permission of that software to everyone.

    Regards


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, August 25, 2016 5:43 AM
    Moderator
  • Hi,

     I tried given full control permissions to everyone in c:\windows\system32\tasks and it keeps failing with "access denied" error.

    Any other ideas?

    MORE INFO:

    (With administrator rights) schtasks /Create /TN test /TR "\"C:\tmp\test.bat\"" /sc DAILY /st 07:00 /f /RI 30 /du 24:00 /RL HIGHEST /ru SYSTEM

    (Without administrator rights) schtasks /Run/TN test --> access denied

    (With administrator rights) schtasks /Create /TN test /TR "\"C:\tmp\test.bat\"" /sc DAILY /st 07:00 /f /RI 30 /du 24:00 /RL HIGHEST

    (Without administrator rights) schtasks /Run/TN test --> runs OK

    (With administrator rights) schtasks /Create /TN test /TR "\"C:\tmp\test.bat\"" /sc DAILY /st 07:00 /f /RI 30 /du 24:00 /ru SYSTEM

    (Without administrator rights) schtasks /Run/TN test --> access denied

    So the "access denied" problem appears when the scheduled task is created to be executed with  "SYSTEM" user account rights.

    Best regards

    • Edited by Bstia Thursday, August 25, 2016 10:12 AM
    Thursday, August 25, 2016 6:28 AM
  • Also fails if you attempt to run as the "INTERACTIVE" user.
    Thursday, September 1, 2016 4:22 AM