Issue is very peculiar, I have a version of NodeJS installed in Windows (in program files x86) and a newer version of software downloaded and exe is extracted.
The installed NodeJS (node.exe) 's path is included in system path variable. I added the extracted path to user environment path variable. After doing my bit of RTFM I came to know that in case path variable both system and user environment variables are combined and the system gets the precedence.
Is there any way I can override (or nullify) the system variable's PATH with user variable's path ? or can the precedence of reading variables be changed ?
For accounts without admin privileges: Open "User Accounts" and choose "Change my environment variables" (http://support.microsoft.com/kb/931715). This dialog will show you your current user variables as well as the system variables. You may need to add a local PATH variable if you haven't already.
Control Panel -> User Accounts -> User Accounts -> Change my environment variables (left side). This will open the user variables without admin access allowing the user's variables to be edited. Make sure the user account's name is showing where the red circle is. Save this answer.
A regular user environment variable overrides completely a system one with the same name if both exist, but only for the specific user it is specified for. However, the user path variables is treated differently. It is appended to the system path variable when evaluating, rather than completely replacing it.
In cmd, type
set PATH=D:\Path_To_Local_Folder;%PATH%
node
It will start node from your local folder.
Using Powershell you can set the folder Node runs from so that it picks up the new version of Node for that instance of Powershell.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With