In a cmd
window, if I type chrome
, I get the below message because chrome
is not in my PATH
.
'chrome' is not recognized as an internal or external command,
operable program or batch file.
But if in the Run window (win + R
), I type chrome
, chrome will run.
Why is this happening? How does Run find the application?
答え1
The run
box uses all the app paths in this key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
command prompt
can only find things in the environmental path.
To add chrome to path, you would:
- Open
File Explorer
, right clickThis PC
and chooseProperties
. - On the left, click
Advanced System Settings
- On the
Advanced
tab, chooseEnvironmental Variables
. - Edit path under the
system variables
section add c:\program files\chrome\chrome.exe or wherever it is