Windows Path Variable Isn't Working

Windows Path Variable Isn't Working

I have the following folder in my PATH (both paths actually, the system path and my user path)

C:\Users\deqn\.cargo\bin

In 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?

7

2 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).

0

I 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.exe

On updating PATH variable to point to only one desired directory (basically I removed %USERPROFILE%\AppData\Local\Microsoft\WindowsApps from PATH) fixed my problem.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.