0

As an admin, I am scheduling my task for another user by doing this .bat command to schedule for ANOTHER_USER:

schtasks /create /tn AlarmClock /tr C:\ProgramData\AlarmClock.exe /sc onlogon /ru ANOTHER_USER /RL HIGHEST 

However, if ANOTHER_USER is not admin, the task will not be executed. I get the following message:

the requested operation requires elevation

However, I have to keep the /RL HIGHEST tag because the program is using UAC privileges.

If I manually allow the program to be run by everyone, (in AlarmClock.exe>Properties>Security>Allow Full Control), and I remove the /RL HIGHEST tag, it will still not work because of some elevation-related requirements.

Can someone please help me with some new sources of information? because I am running short of ideas…

1 Answers1

1

AFAIK what you want to do is not possible with task scheduler alone. If you run as a User that is not Admin you can't run with Admin privileges and not get the UAC Prompt.

What might be possible is to create a script that uses a secure-string in an encrypted file to get admin credentials and run the script as the user but with the privileges of the saved credentials. However I don't know how "safe" this is if high security is important in your case...

EDIT: If you want to try that this might be useful.

Toto
  • 19,304