I checked environmental variables for both system and my account. Both have C:\Users\myname\.cargo\bin set in Path, among other locations.
If I try to use cargo in CMD.exe in any directory other than in the one above, it is not recognized untill I cd to .cargo\bin directory. I'm bit confused by this. Any idea what I should do to make this command visible from anywhere?
I actually did try reopening the CMD.exe, restarting, and setting up the Path in both Windows system and user account environmental variables settings). This was mentioned elsewhere as part of troubleshooting process.
Running the installer again simply states that rust is installed (congrats message).
I also tried uninstalling via rustup self uninstall (I found this somewhere else online) and then repeating the installation and the troubleshooting steps but I'm still experiencing the same problem.
I'm all out of ideas. Not off to a good start I must say. All these issues without even actually doing anything makes me wonder how it would look like actually doing something in it...
I can't tell if this is Discourse's formatting or an issue with your PATH, but the path in your posts displays without a backslash between "myname" and ".cargo". Those should be two separate directories: C:\Users\myname\.cargo\bin.
Just out of curiosity, what happens when you run echo %PATH% in a shell? Does it print out the expected path with an entry to your C:\Users\myname\.cargo\.bin?
In the past I had problems where I was updating the path for the administrator (I needed to run something as admin) and not for my current user.
This is definitely not a normal experience! I've installed rust on several Windows computers at work and it all Just Worked. If rustup is actually adding ~\.cargo\bin to the PATH variable then something else may be going on. If you are in an enterprise environment the domain policy may be playing with environment variables.
If all else fails, I'd suggest creating an issue on the rust-lang/rustup repository's issue tracker so they can help solve your problem and make sure it doesn't happen to the next guy.
I just want to let you all know that after going through additional three uninstall/install cycles, I am now able to invoke cargo from anywhere in CMD.exe. I'm not sure what happened but at least it works now. I also tried Atom and VSC and the command runs fine in them too (via appropriate packages/extensions).
I'll take it with me from this thread not to cd into bin folder as kornel noted.