AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Add "Run as Administrator" for AutoHotkey Scripts

 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
shajul



Joined: 15 Sep 2006
Posts: 564

PostPosted: Thu Oct 29, 2009 3:25 pm    Post subject: Add "Run as Administrator" for AutoHotkey Scripts Reply with quote

..on Vista or Windows 7

I searched the forum for this, but could not find it.. so posting this solution here..

This is not my original solution, but i found it on Howtogeek.com

This is better than compiling every script as an executable..

Registry Hack for AutoHotkey “Run as Administrator”

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.
Name Value

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

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

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

The reg file is available on the original site..
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
wtg



Joined: 04 Oct 2006
Posts: 210
Location: Louisville, KY

PostPosted: Fri Oct 30, 2009 1:48 pm    Post subject: Reply with quote

Good tip... thanks for posting it. I was just wondering how to do this myself a couple of days ago.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group