coreybutler / nvm-windows

A node.js version management utility for Windows. Ironically written in Go.
MIT License
37.28k stars 3.32k forks source link

[Feature]: Add an option to manipulate if use admin privilege or non-admin one #1150

Closed zayne-wang closed 3 months ago

zayne-wang commented 3 months ago

Description of the new feature / enhancement

Can there add an option to control if use admin privilege or not. If so, there could decrease lot's of privilege request. If use admin privilege, system wide Env is used, and if not, use user wide.

e.g.: add a option in config file:

 use_user_wide: true | false (default)
// true: manipulate user wide env settings, and use /J option when call mklink
// false: manipulate system wide env settings, and use /D option when call mklink

or seperate the mklink /J or /D and the privilege settings.

Scenario when this would be used?

On some machine, there is no access to grant a user as a system administrator, but through modify environment, the node could also be use.

Supporting information

No response

coreybutler commented 3 months ago

No. See Runtime.

Junctions require more work because they will break environments that use network attached storage, mapped drives, or different hard drives than the one where nvm4w is installed. That would break usage for ~43% of the community (many millions of people). There is a fork providing this support if you need this today (search the issues).

Runtime, which will replace NVM4W, uses different mechanisms to support non-admin users. Since this would be a breaking change for so many, it would need a new semver major release, which we don't plan to do (because Runtime will be a better option).

zayne-wang commented 3 months ago

No. See Runtime.

Junctions require more work because they will break environments that use network attached storage, mapped drives, or different hard drives than the one where nvm4w is installed. That would break usage for ~43% of the community (many millions of people). There is a fork providing this support if you need this today (search the issues).

Runtime, which will replace NVM4W, uses different mechanisms to support non-admin users. Since this would be a breaking change for so many, it would need a new semver major release, which we don't plan to do (because Runtime will be a better option).

Expecting for runtime! Also, thanks for your great project!!