1
1
I am working in a Windows XP Pro environment and I am wondering if there is a simple way to make a program be executable from any path in the command prompt. Are environmental variables needed? And if so, how can I add a path to the PATH environmental variable and have it be available anywhere?
Example:
From the cmd, I write echo %PATH%
and it shows me the path of where my program is.. i.e.
C:\ProgramFolder
However, I try to execute it on my desktop and it says the program name is not recognized as an internal or external command, operable program or batch file
.
C:\Documents and Settings\me> program
(The executable program is in the folder ProgramFolder
.)
Am I doing something wrong? Does the path need to be directed to the program itself vs the program folder??
Thanks.
In order to be able to start an executable from everywhere, it has to be within a folder that is on the PATH. For your questions about setting the PATH and environment variables, see here: http://superuser.com/questions/284342/how-do-i-set-path-and-other-environment-variables
– slhck – 2011-05-18T21:55:24.757You write "From the cmd, I write echo %PATH% and it shows me the path of where my program is.. i.e. C:\ProgramFolder" You are not being accurate. Maybe there's an error in your path. You should paste into your post exactly what ECHO %PATH% shows. – barlop – 2011-05-19T00:25:46.100