Page 1 of 1

How to give a script elevated rights without UAC prompt - "Program, close", Task Manager etc

Posted: 12 Aug 2022, 22:27
by Noo0B
Hi,
If you need elevated rights for a code, for example a Task Manager code or a "program, close" line of code and also would like to remove the UAC prompt, you can use this Scheduled Tasks tool I found:
https://drive.google.com/file/d/1JsNUp5GDAjJSGHbarAZUo4y2_nzYGWL6/view?usp=sharing from this webpage :https://www.tenforums.com/tutorials/57690-create-elevated-shortcut-without-uac-prompt-windows-10-a.html. I believe there is another post on the same website with the same solution.
To use this, name whatever you want on it's first input for the shortcut it creates and it will link to the file specified next. After finished, the shortcut can then be moved, but not renamed. To delete this, go to Scheduled Tasks app and proceed, and also delete the shortcut.
If you just want the elevated rights you can use this:

Code: Select all

if not A_IsAdmin
	Run *RunAs "%A_AhkPath%" "%A_ScriptFullPath%"
I hope it helps.
Regards.

Re: How to give a script elevated rights without UAC prompt - "Program, close", Task Manager etc

Posted: 13 Aug 2022, 02:48
by ozzii
Didn't know for that bat.
Thanks