I have the following folder in my PATH (both paths actually, the system path and my user path)
C:\Users\deqn\.cargo\binIn this folder there is file called racer.exe, when I try to run it from cmd
.\racer.exe or racer.exe or racer or .\racer
I get
'.\racer.exe' is not recognized as an internal or external command,
operable program or batch file.Everything seems to work fine, when I go to the folder (cd C:..). Any ideas what my be wrong?
72 Answers
you can do one of two things:
Put all variables in System Variables instead of User and add the ones you want to PATH Or
Put all variables in User Variables, and create or edit the PATH variables in User Variable, not In System. The Path variables in System don't expand the User Variables. If the above are all correct, but the problem is still present, you need to check the system Registry, in HKEY_CURRENT_USER\Environment, to make sure the "PATH" key type is REG_EXPAND_SZ (not REG_SZ).
0I was facing similar problem with python. What helped me is where command.
C:\WINDOWS\system32>where python
C:\Users\xxxxxxx\AppData\Local\Microsoft\WindowsApps\python.exe
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_86\python.exeOn updating PATH variable to point to only one desired directory (basically I removed %USERPROFILE%\AppData\Local\Microsoft\WindowsApps from PATH) fixed my problem.