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

Put simple Tips and Tricks that are not entire Tutorials in this forum
Noo0B
Posts: 151
Joined: 26 Jan 2018, 19:54

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

12 Aug 2022, 22:27

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.

Return to “Tips and Tricks (v1)”

Who is online

Users browsing this forum: No registered users and 83 guests