Skip to content

Commit

Permalink
Backup PATH env variable to file (precautionary). Fixes coreybutler#662
Browse files Browse the repository at this point in the history
  • Loading branch information
coreybutler committed Sep 11, 2021
1 parent 54db8e7 commit ec5ebc1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/install.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set NVM_SYMLINK=C:\Program Files\nodejs
setx /M NVM_HOME "%NVM_HOME%"
setx /M NVM_SYMLINK "%NVM_SYMLINK%"

(echo PATH=%PATH%) > %NVM_HOME%\PATH.txt

for /f "skip=2 tokens=2,*" %%A in ('reg query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v Path 2^>nul') do (
setx /M PATH "%%B;%%NVM_HOME%%;%%NVM_SYMLINK%%"
)
Expand Down

0 comments on commit ec5ebc1

Please sign in to comment.