Prevent or avoid UAC prompt when Run as Admin?

  autohotkey, windows

I need my script to run as admin, when either in editor or double clicking the script icon in explorer (Not at startup) I have tried using

Run *RunAs "%A_ScriptFullPath%"

It gets me there halfway but the UAC prompt breaks my scipts because I have to answer YES or NO. How can I prevent this prompt or automatically answer it?

if I cant, Is there another way to elevate my AHK script?

Why do I need to do this? I am using a third party program as an atleternative to Alt+Tab. I want to get AHK to cycle programs using Ctrl+wheel. The AHK scripts hotkeys will only work if the AHK script is running as admin. Thanks

Source: Windows Questions

LEAVE A COMMENT