jdana
asked on
Trying to understand the difference between an executable call at the Run command versus a command prompt.
If I call the Excel executable (excel.exe) from a command prompt, it doesn’t work (Image 1). If I call it from the run command, however, it works just fine (Image 2). Why does the Run command know what to do with excel.exe whereas, the command prompt doesn’t? In an effort to answer my own question, I started poking around my computer’s Environment Variables. (I’m running W7 Pro.)
I took a look at the Path Variable, there’s no hint of C:\Program Files\Microsoft Office (or %programfiles%\Microsoft Office).
Is there another Environment Variable that the Run command has the privilege of using that the command prompt does not? Or, does the difference in behavior reside somewhere else?
From-Command-Prompt.png
From-Run-Command.png
I took a look at the Path Variable, there’s no hint of C:\Program Files\Microsoft Office (or %programfiles%\Microsoft Office).
Is there another Environment Variable that the Run command has the privilege of using that the command prompt does not? Or, does the difference in behavior reside somewhere else?
From-Command-Prompt.png
From-Run-Command.png
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This site has a good breakdown on how to modify your enviromental variables
http://www.voidspace.org.uk/python/articles/command_line.shtml
http://www.voidspace.org.uk/python/articles/command_line.shtml
This is mainly due to two type of environment variable.
1) User Variable and 2) System Variable.
You can copy Path from System variable to user variable and both will work in same way for you.
1) User Variable and 2) System Variable.
You can copy Path from System variable to user variable and both will work in same way for you.
ASKER
angelIII,
You mention "registered" applications. Is that the key? Does the Run Command know what to do with excel.exe through the OS (Windows 7) and registry values?
J
You mention "registered" applications. Is that the key? Does the Run Command know what to do with excel.exe through the OS (Windows 7) and registry values?
J
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
oBdA,
Perfect. Thanks for the info.
J
Perfect. Thanks for the info.
J
cd Program Files\Microsoft Office\Office12\
excel.exe