Files
nvm-windows/assets/setuserenv.vbs
2024-12-28 22:23:51 -06:00

11 lines
384 B
Plaintext

Set WSHShell = CreateObject("WScript.Shell")
userpath = WSHShell.RegRead("HKCU\Environment\Path")
If InStr(userpath, "%NVM_HOME%") = False Then
userpath = userpath & ";%NVM_HOME%;"
End If
If InStr(userpath, "%NVM_SYMLINK%") = False Then
userpath = userpath & ";%NVM_SYMLINK%;"
End If
userpath = Replace(userpath, ";;", ";")
WSHShell.RegWrite "HKCU\Environment\Path", userpath