As regular readers know well, I am a huge fan of using Auto Hotkey to automate my whole computing experience… but in Windows Vista there is a serious restriction since you can not run a script as Administrator by default. This means that your hotkeys can not cooperate with windows running in Admin mode… so how do we get around this?
There are three techniques to this isue:
• Completely Disable UAC – Not the best solution for security purposes, but it works.
• Compile your script to an executable.
• Hack the registry and add “Run as Administrator” to the context menu.
Compile Script as Executable
Just right-click on the script, choose “Compile Script”…
And now you will able to run the executable version as administrator:
This is not the ideal solution, however. I edit my script all the time, do so every time I make an edit ... would get annoying recompiling
Manual Registry Hack for AutoHotkey “Run as Administrator”
Open regedit.exe through the start menu or search box, and then scroll down to the following key:
HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell
Right click on "Shell" on the left and make a new key called "runas", then a key called "Command" below. Then make or set these two values on the right side, the alignment of the path if necessary.
N
(Default) -“C:\Program Files\AutoHotkey\AutoHotkey.exe” “%1″ %*
IsolatedCommand0 - “C:\Program Files\AutoHotkey\AutoHotkey.exe” “%1″ %*
Just want to set the value because default key must already be there.
You will observe the option to Run as Administrator, when you right-click on an AutoHotkey script:
Download Registry Hack
Download, extract, and double-click on the AdminAutoHotkey.reg to enter the information into the registry. There’s also a removal script included. Note that this registry hack will only work if you installed AutoHotkey into the default location, otherwise you’ll have to modify the paths.







Reply With Quote
Bookmarks