Thursday 5 January 2012

Run AutoHotKey Scripts as Administrator without compilation in Windows 7 or Vista

Manual Registry Hack

Open up regedit through the start menu search or run box, and then browse down to the following key:

HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell

Right-click on “Shell” on the left-hand side and create a new key called “runas”, then create a key called “Command” below it. Then create or set the following two values on the right-hand side, adjusting the path if necessary.

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

The default key should already be there, just need to set the value.

Now when you right-click on an AutoHotkey script, you’ll see the option to Run as Administrator:

No comments:

Post a Comment