Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Hardcoded cmd PATH is never updated! #5

Closed
fourpixels opened this issue Jun 10, 2015 · 6 comments
Closed

Hardcoded cmd PATH is never updated! #5

fourpixels opened this issue Jun 10, 2015 · 6 comments

Comments

@fourpixels
Copy link

Hi guys,
I've been struggling with an extremely unpleasant issue for about a week now (http://stackoverflow.com/q/30685194/2065080).

I'm not sure how cmd_auto_run.bat appeared and how I got it as a path in AutoRun in Command Processor registry, but it turned out that each time console (cmd) is used, this bat file is executed. And there I found:

@echo off 
set "NVMW=v0.10.36"
set "NVMW_DEFAULT=v0.10.36"
set "PATH=C:\Users\..."

What this means is that no matter what changes I do to the system/user PATH variable, they are NEVER applied to cmd, because each time it is started, the PATH is overwritten. This is extremely unpleasant and unprofessional!! It's not that hard to find the current version of npm that is used and replace it with one of the NVMW variables, and then appending the original PATH.

I've spent numerous hours trying to understand why only cmd is not getting the PATH properly... This is insane. I am now spending time to understand how to uninstall nvmw, as it is installed in different node version than the one I use (must switch through all to find where it is). Totally wrong!

@fresc81
Copy link

fresc81 commented Jun 10, 2015

A qoute from the readme: You should install a system version Node with Windows installer.
Just saying ;) Correct me if I'm wrong but I think this means custom node installations are not supported under Windows.

@fourpixels
Copy link
Author

This means that I must install let's call it "root" nodejs version, where I install nvmw, and then switch (use) / install / uninstall other versions.. That's exactly what I've done. The problem is that it messes up with my PATH, so I cannot use it for anything else, nor I can uninstall nvmw, because it's in another folder of nodejs...

@fresc81
Copy link

fresc81 commented Jun 10, 2015

Yes, I got you. The PATH variable in cmd_auto_start.bat is only updated by doing

  nvmw switch-deactivate
  nvmw switch SOME_VERSION

manually and the complete replacement of the PATH variable seems to be bad designed.

@sotirosn
Copy link

sotirosn commented Apr 1, 2016

I installed nvmw years ago and forgot it did this. Now after days of searching the stackexchange for answers as to why my cmd path is out of wack I found the culprit.

@fourpixels
Copy link
Author

If this module won't be updated I think it even has to be deleted - this is huge error and extremely dangerous to work with. Being able to modify your PATH is crucial! I'm sorry for all of you that spent numerous hours looking for the problem :)

@Sv443
Copy link

Sv443 commented Dec 6, 2020

This has literally caused me to not be able to work with Qt Creator anymore for a year since the Windows Build Tools and the Win10 SDK binaries (mostly cl.exe and rc.exe) were always removed from the PATH variable (see my answer on SO).
I am incredibly pissed off but also happy to have finally figured it out.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants