We should be using powershell/CLI in the wiki/scripts to assist the user.
Create an "install.cmd" file with these lines:
setx /m NVM_HOME "C:\nvm"
setx /m NVM_SYMLINK "C:\Program Files\nodejs"
setx /m PATH "%PATH%;%NVM_HOME%;%NVM_SYMLINK%"
(echo root: C:\nvm && echo path: C:\Program Files\nodejs && echo arch: 64 && echo proxy: none) > C:\nvm\settings.txt
I updated "install.cmd" file with these lines to make installation even easier (simple and clean):
set /P NVM_PATH="Enter the path where zip file is extracted/copied to: "
setx /M NVM_HOME "%NVM_PATH%"
setx /M NVM_SYMLINK "C:\Program Files\nodejs"
setx /M PATH "%PATH%;%NVM_HOME%;%NVM_SYMLINK%"
if exist "%SYSTEMDRIVE%\Program Files (x86)" (
) else (
(echo root: %NVM_HOME% && echo path: %NVM_SYMLINK% && echo arch: %SYS_ARCH% && echo proxy: none) > %NVM_HOME%\settings.txt
KISS Principle - Keep It Simple Stupid
If you need a more complex install, why not just use the installer version?
The installer does not work on Windows server core. And the installer does nothing extra that Powershell cannot already do, which together with unattended MSI is commonly used for corporate server devops and agentless ochestration/deployments.
First, I am not opposed to this... I want to make that very clear. In fact, I'm happy to add this to the noinstaller version. I just want to make sure I fully understand the use case and existing problems so they're addressed properly and completely... I'd really like to know more detail about where the installer is failing. Ultimately, I'd rather focus attention on creating a universal installer that works on all platforms, as opposed to maintaining multiple scripts. This should be much easier since my request for a Bitrock open source license recently came through... I will be rebuilding the installer and I can take the time to knock out issues/make improvements.
For the time being, I can easily copy/paste your script myself, but I'd prefer you create a Pull Request so you'll get credit as a contributor. The script should go in the bin directory, which is where the assets are stored that get packaged in the release.
Last but certainly not least, thanks for this contribution!
Just echoing support for this... I fumbled around trying to figure out why all the nvm cli commands failed with "Could not be found or does not exist" before I looked at the src for nvm.go. That led me to understand I needed to create a settings.txt and an NVM_HOME env variable.
Added a manual installer, courtesy @heri16. Closes #20.
I included the script, almost exactly as is, in the master branch. I have several other things to add before the next release, but this will be included in the "no-install" download going forward.