8

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?

8
  • there will be place where you get path 1. user variable for 'user name' and 2. system variables. in that you have to set path in system variables. Commented May 30, 2016 at 10:02
  • I didn't understand what you mean. Commented May 30, 2016 at 10:05
  • can i know which os have you installed? i am talking in terms of windows 10. Commented May 30, 2016 at 10:18
  • windows 8.1, I'm using windows-8 tag by mistake. Commented May 30, 2016 at 10:22
  • comment back if this work for you Commented May 30, 2016 at 10:26

3 Answers 3

4

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
0

When you add a new entry to your environment variables, you also need to restart terminal/cmd for the command to be recognised.

1
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Jun 4 at 14:12
-1

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
  • This has nothing to do with his problem in any way shape or form. Please see my comment against the initial question. You are showing a problem where you are getting the wrong version of a file. The OP is showing that NOTHING is showing up in the PATH. Commented Mar 31, 2022 at 18:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .