| View previous topic :: View next topic |
| Author |
Message |
deleyd
Joined: 08 Mar 2008 Posts: 64 Location: Santa Barbara
|
Posted: Mon Jul 06, 2009 5:43 pm Post subject: autohtokey.exe not in PATH but still works? |
|
|
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 |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 1886 Location: Germany
|
Posted: Mon Jul 06, 2009 8:13 pm Post subject: |
|
|
| 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 |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 8688
|
Posted: Mon Jul 06, 2009 8:20 pm Post subject: Re: autohtokey.exe not in PATH but still works? |
|
|
| 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 |
|
 |
deleyd
Joined: 08 Mar 2008 Posts: 64 Location: Santa Barbara
|
Posted: Tue Jul 07, 2009 5:23 pm Post subject: |
|
|
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 |
|
 |
|