There are three solutions to this problem:

• Not the best solution for security purposes, but it works-- Completely stop UAC.

• Compile your script to an executable.

• Hack the registry and add “Run as Administrator” to the context menu.

Compile Script as Executable right-click on the script, select “Compile Script”…

Name:  1.png
Views: 137
Size:  13.7 KB

And now you can run the executable version as administrator:

Name:  2.png
Views: 120
Size:  12.1 KB

This is not the correct solution, however. I edit my script all the time, so having to recompile each time I make an edit… would get irritating.

Manual Registry Hack for AutoHotkey “Run as Administrator”

Start>>search or run box>> type regedit >> browse down to the following key:

HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell

Name:  3.jpg
Views: 320
Size:  20.6 KB

Right click on "Shell" on the left and make a new key called "runas", and then a key called "Command" below. Then make whether the two values on the right side, the alignment of the path if necessary.


(Default) : “C:\Program Files\AutoHotkey\AutoHotkey.exe” “%1″ %*
IsolatedCommand : “C:\Program Files\AutoHotkey\AutoHotkey.exe” “%1″ %*

The default key must already be there, just need to put the value.

You will see the option to Run as Administrator, once you right-click on an AutoHotkey script:

Name:  4.png
Views: 162
Size:  14.8 KB

Download Registry Hack

Download>>extract>> double-click on the Admin AutoHotkey.reg to enter the information into the registry. There is also a removal script built-in.