Commands for installing Node.js 4 without prompts, removing it again and detecting it from deployment tools. A command is shown only when it is certain: from the manifest or the installer technology’s documented default.
Related guide: Silent install switches: MSI, NSIS, Inno Setup · Uninstall a program with the registry or PowerShell
With winget
PowerShell
winget install --id OpenJS.NodeJS.4 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id OpenJS.NodeJS.4 -e --silentwinget uninstall --id OpenJS.NodeJS.4 -e --silentBy installer
64-bit · MSI · All users
Silent install
msiexec /i node-v4.8.7-x64.msi /qn /norestartWrite a log
msiexec /i node-v4.8.7-x64.msi /qn /norestart /l*v "%TEMP%\node-js-4-install.log"Uninstall
msiexec /x {BF912CAE-C070-4243-97DC-4719025F728F} /qn /norestart- MSI product code
- {BF912CAE-C070-4243-97DC-4719025F728F}
- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BF912CAE-C070-4243-97DC-4719025F728F}
- Install folder
- %ProgramFiles%\nodejs
64-bit · ZIP
No installation needed (portable)
32-bit · MSI · All users
Silent install
msiexec /i node-v4.8.7-x86.msi /qn /norestartWrite a log
msiexec /i node-v4.8.7-x86.msi /qn /norestart /l*v "%TEMP%\node-js-4-install.log"Uninstall
msiexec /x {BB0F1FF9-62B2-405E-A37B-45C66B813905} /qn /norestart- MSI product code
- {BB0F1FF9-62B2-405E-A37B-45C66B813905}
- Uninstall registry key
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{BB0F1FF9-62B2-405E-A37B-45C66B813905}
- Install folder
- %ProgramFiles(x86)%\nodejs
32-bit · ZIP
No installation needed (portable)
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-node-js-4.ps1
$url = 'https://nodejs.org/dist/v4.8.7/node-v4.8.7-x64.msi'
$sha256 = '244D272C87ECEF9343A4B235EE08D1C3206BB2F18E09464B5CDAD57BF1E6EB54'
$file = Join-Path $env:TEMP 'node-v4.8.7-x64.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait install-node-js-4.ps1
$url = 'https://nodejs.org/dist/v4.8.7/node-v4.8.7-x86.msi'
$sha256 = 'DB1F61E59444FD1178B8A12BCC15BB7D2F935D447B9D50B7A18AE9EB6C1A573A'
$file = Join-Path $env:TEMP 'node-v4.8.7-x86.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait