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%"
Regards.