Batch Script


I'm getting an error message when trying to run bat script:
"The requested operation requires elevation <Run as administrator>
I need to run the script via task scheduler so I can use "run as administrator option"

Any ideas?
Who is Participating?
Gerwin Jansen, EE MVEConnect With a Mentor Topic Advisor Commented:
For which Windows version is your question btw?


Adding a task (in this case regedt32.exe) specified with 'Run with highest ...' does not give me the UAC popup:

Test with Regedit
here is a way to elevate .bat permissions
Gerwin Jansen, EE MVETopic Advisor Commented:
@compx_it - I can imagine you want the batch file to run in the background as it is a scheduled job - it this the case? If so then the suggestion above from QuinnDex is not working as it is prompting for administrative rights (UAC / GUI).
alternatively convert the .bat to a .exe this will eliminate the need to run as administrator
Gerwin Jansen, EE MVETopic Advisor Commented:
May I ask why the B-grade?

You can read about grading here:

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.