Closed JorensM closed 11 months ago
This happens in one of two scenarios I can think of:
NVM_SYMLINK
target directory for each different installation (i.e. both use C:\nvm
).@coreybutler I tested on my work laptop. It can use mklink /J
instead of mklink /D
that required administrator.
@icharge if your work laptop has Developer Mode enabled or an AD group policy granting symlink privileges, then it will work.
As I've said many times before, junctions are not an acceptable option at this time because they do not work across network drives. Given how many enterprises rely on this (SAN drives), it would be a breaking change for nearly half the NVM4W user base.
@icharge if your work laptop has Developer Mode enabled or an AD group policy granting symlink privileges, then it will work.
As I've said many times before, junctions are not an acceptable option at this time because they do not work across network drives. Given how many enterprises rely on this (SAN drives), it would be a breaking change for nearly half the NVM4W user base.
That’s problem. I can’t enable developer mode due to company’s policy. That was crazy.
What if it can be configurable.
Edit: I just see Scoop app can install many applications without admin. they use symbolic link too. I not sure about the method. it would be junctions I guess.
@icharge - I've thought about making it configurable, but there's a whole different set of edge cases to deal with. I don't have time to do that. I've frozen feature development in order to work on the successor project: Runtime.
The bottom line is installing multiple versions of Node is... you know, installing multiple applications. It's not unusual for companies to block this. The entire reason Microsoft created Developer Mode is so companies could allow a few "power" features for those who need it without destroying their carefully crafted security policies. That's a fancy way of saying that your company will have to grant you some sort of access at some point if you're going to install multiple versions of Node. Most employers do this at some point (even strict ones, like some governments and militaries). I've worked with countless cybersecurity groups to allow-list NVM4W. If your company needs something specific to deploy NVM4W, I'm happy to talk to the cybersecurity team.
When all else fails, I tend to recommend installing NVM4W on a non-protected directory, and setting the symlink to a non-protected directory as well. For example, install to C:\nvm4w
and symlink to C:\nodejs
. You still need permission to use the underlying mklink
capability, but this eliminates the possibility of messing with C:\Program Files
(a Windows protected directory).
I'm closing because this isn't really a bug. In fact, running without admin privileges is a frequently requested feature.
What happened?
At some point my
nvm use
command stopped complaining about missing admin privileges.As you can see in the screenshot above, I've ran
nvm use
without having run the CMD as an admin(you can tell by the title of the window).Thing to note: I had installed another
nvm-windows
instance on a different Windows user for testing. The other installation is separate from the original one though - it has a different appdata folder and a different symlink folder. But I think I still had theadmin privilege
error present even after installingnvm
on the other user - I'm not sure.What did you expect to happen?
I expected
nvm use
to complain that I don't have admin rights to run the command.Version
1.1.11 or newer (Default)
Which version of Windows?
No response
Which locale?
None
Which shell are you running NVM4W in?
No response
User Permissions?
Administrative Privileges, Elevated
Is Developer Mode enabled?
None
Relevant log/console output
No response
Debug Output
Anything else?
No response