-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: Reduce number of UAC elevation prompts #487
Comments
Once runElevated is executed once, it shouldn't prompt again. That said, I have seen this occur from time to time, never being able to identify a specific Windows build in which it occurs. @rbuckton can you provide the specific Windows build you're running? Thanks in advance. |
Another note: It is not necessary to elevate to create symlinks in Windows 10 following build 14972 if you have Developer Mode enabled: https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/ In addition to only requesting elevation once, I would suggest updating the script that creates the symlinks to first try to create the symlink without elevation, then fall back to elevation if that fails. |
You can test for whether Developer Mode is enabled by checking the value of https://docs.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development You can also get the version of windows using |
(though its still necessary to elevate to write to \Program Files, so I'm not sure if the above will help) |
I think if someone can adjust windows UAC prompt settings, then they can also adjust their privileges to create symbolic link. please see secuirty-policy-settings. this vbscript changes works based assuming:
If your pc is controlled by domain controller, Domain Administrator would prefer to give symbolicLinkPrivilege rather than change UAC settings. please adjust elevate.vbs like below
finally change shell.ShellExecute routine like below: |
My Environment
Windows 7 or below (not truly supported due to EOL - see wiki for details)
Windows 8
Windows 8.1
Windows 10
Windows 10 IoT Core
Windows Server 2012
Windows Server 2012 R2
Windows Server 2016
My Windows installation is non-English.
I'm using NVM4W version:
I have already...
My issue is related to (check only those which apply):
Expected Behavior
When changing the active NodeJS installation between versions,
nvm
should display a UAC elevation prompt at most once.Actual Behavior
nvm
displays a UAC elevation prompt twice:nvm-windows/src/nvm.go
Lines 400 to 415 in 15c5743
nvm-windows/src/nvm.go
Line 402 in 15c5743
nvm-windows/src/nvm.go
Line 410 in 15c5743
Steps to reproduce the problem:
nvm
disabled (i.e. no symlinks exist) and two different installed versions of NodeJS (X
andY
):nvm use X
for an installed versionX
. UAC prompt appears once.nvm use Y
for an installed versionY
. UAC prompt appears twice.The text was updated successfully, but these errors were encountered: