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 

autohtokey.exe not in PATH but still works?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
deleyd



Joined: 08 Mar 2008
Posts: 64
Location: Santa Barbara

PostPosted: Mon Jul 06, 2009 5:43 pm    Post subject: autohtokey.exe not in PATH but still works? Reply with quote

Why does this work at a command prompt:
Code:
>autohotkey.exe MyScript.ahk

Usually I can't run programs unless their directory is in the PATH environment, otherwise the computer doesn't know where the program is. Autohotkey is not in the PATH, so how does the computer know where it is?
Back to top
View user's profile Send private message Visit poster's website
Tuncay



Joined: 07 Nov 2006
Posts: 1886
Location: Germany

PostPosted: Mon Jul 06, 2009 8:13 pm    Post subject: Reply with quote

If i try to call autohotkey.exe on my command line, it does say me that the program is not found, unless I am in same directory. So why do you think your computer knows about autohotkeys path? If it is not in PATH variable ... so you cannot execute it.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
SKAN



Joined: 26 Dec 2005
Posts: 8688

PostPosted: Mon Jul 06, 2009 8:20 pm    Post subject: Re: autohtokey.exe not in PATH but still works? Reply with quote

deleyd wrote:
Autohotkey is not in the PATH, so how does the computer know where it is?

It could be in registry.. Check the following:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
Back to top
View user's profile Send private message Send e-mail
deleyd



Joined: 08 Mar 2008
Posts: 64
Location: Santa Barbara

PostPosted: Tue Jul 07, 2009 5:23 pm    Post subject: Reply with quote

Yup there it is:
Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AutoHotkey.exe]
@="C:\\Program Files\\AutoHotkey\\AutoHotkey.exe"

The instructions say to call an autohotkey script use:
Code:
AutoHotkey.exe [Switches] [Script Filename] [Script Parameters]

http://www.autohotkey.com/docs/Scripts.htm#cmd
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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