Chocolatey Node.js

 Chocolatey is a package manager for Windows that is analogous to Debian APT package management system. This will do all the hard work while upgrading Node.js. For installation follow the steps below.

1.Open command prompt

2.Activate admin privileges

3.paste the following text: 

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
4.hit enter to run the script and install chocolatey. 5.After the installation is completed, close the command prompt. Now we will see how to install Node.js using Chocolatey. Open power user menu in windows and select command prompt. When prompted click yes to windows UAC. Enter the below given command to install the current version of Node.js.
C:\> choco install nodejs -y
When the installation gets completed, close the command prompt. Finally test Node.js to see if it works. Open power user menu on windows and select command prompt to launch the normal command prompt. Check the current node version by typing the command.
C:\> node -v
If it's okay, let’s launch Node REPL and enter an arithmetic expression to check if it's working properly.
C:\> node
> 1 + 3
In most cases Node.js is working perfectly. Now let’s create a Magic Node.js upgrade icon. Create a batch file called node-upgrade.cmd somewhere in your system and add the below lines.
choco upgrade nodejs -y
pause
Then right click on the batch file and select create shortcut. Move the newly created shortcut to your desktop. Click on it and press F2 to rename it. Right click on the icon and select properties->advanced. Check “Run as Administrator” box. Click ok and exit. You can double click the icon anytime you want to upgrade Node.js. To uninstall Node.js using chocolatey open command prompt with elevated privileges as admin. Select yes when prompted. Enter the following uninstall command.
C:\> choco uninstall nodejs -y
This package is a meta/virtual or an installer or portable application package.