Skip to content

Commit

Permalink
Merge pull request #511 from rbuckton/patch-1
Browse files Browse the repository at this point in the history
Do not elevate unless necessary
  • Loading branch information
coreybutler authored Mar 25, 2020
2 parents 1224235 + dc918c4 commit fa9b90a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/elevate.cmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
@setlocal
@echo off

:: Try without elevation, in case %NVM_SYMLINK% is a user-owned path and the
:: machine has Windows 10 Developer Mode enabled
%*
if %ERRORLEVEL% LSS 1 goto :EOF

:: The command failed without elevation, try with elevation
set CMD=%*
set APP=%1
start wscript //nologo "%~dpn0.vbs" %*

0 comments on commit fa9b90a

Please sign in to comment.