I wrote a script, which allows me to plan a task with SCHTASKS and it works, but whenever I try to execute the command with the option /RL HIGHEST, or /RU SYSTEM, the task is not even created.
Don't know why, please help me !
Thank you
I wrote a script, which allows me to plan a task with SCHTASKS and it works, but whenever I try to execute the command with the option /RL HIGHEST, or /RU SYSTEM, the task is not even created.
Don't know why, please help me !
Thank you
Both /RL HIGHEST
or /RU SYSTEM
arguments of SCHTASKS /Create
require elevation. Otherwise, ERROR: Access is denied
is raised.
Run your script elevated. The Run as Administrator in Windows 10 article shows ten ways to achieve elevation however Option Two: To Run as Administrator using Context Menu should suffice in most conditions:
- Option One: To Run as Administrator using Keyboard Shortcut
- Option Two: To Run as Administrator using Context Menu
- Option Three: To Run as Administrator in Apps screen and Start screen Options
- Option Four: To Run as Administrator in Start Menu
- Option Five: To Run as Administrator in File Explorer Ribbon
- Option Six: To Run as Administrator on Taskbar
- Option Seven: To Run as Administrator in Task Manager
- Option Eight: To Always Run as Administrator in Shortcut Advanced Properties
- Option Nine: To Always Run as Administrator in Compatibility Properties
- Option Ten: To Always Run as Administrator in Registry Editor