mirror of
https://github.com/coreybutler/nvm-windows.git
synced 2025-09-07 13:59:48 +00:00
combined updates
This commit is contained in:
22
assets/install.cmd
Normal file
22
assets/install.cmd
Normal file
@@ -0,0 +1,22 @@
|
||||
@echo off
|
||||
set /P NVM_PATH="Enter the absolute path where the nvm-windows zip file is extracted/copied to: "
|
||||
set NVM_HOME=%NVM_PATH%
|
||||
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%%"
|
||||
)
|
||||
|
||||
if exist "%SYSTEMDRIVE%\Program Files (x86)\" (
|
||||
set SYS_ARCH=64
|
||||
) else (
|
||||
set SYS_ARCH=32
|
||||
)
|
||||
(echo root: %NVM_HOME% && echo path: %NVM_SYMLINK% && echo arch: %SYS_ARCH% && echo proxy: none) > %NVM_HOME%\settings.txt
|
||||
|
||||
notepad %NVM_HOME%\settings.txt
|
||||
@echo on
|
Reference in New Issue
Block a user