Commands for installing Node.js (LTS) 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.LTS -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id OpenJS.NodeJS.LTS -e --silentwinget uninstall --id OpenJS.NodeJS.LTS -e --silentBy installer
64-bit · MSI · All users
Silent install
msiexec /i node-v24.22.1-x64.msi /qn /norestartWrite a log
msiexec /i node-v24.22.1-x64.msi /qn /norestart /l*v "%TEMP%\node-js-lts-install.log"Uninstall
msiexec /x {C4336CDB-0C40-48B8-9FB2-2333D58EC5C5} /qn /norestart- MSI product code
- {C4336CDB-0C40-48B8-9FB2-2333D58EC5C5}
- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C4336CDB-0C40-48B8-9FB2-2333D58EC5C5}
ARM64 · MSI · All users
Silent install
msiexec /i node-v24.22.1-arm64.msi /qn /norestartWrite a log
msiexec /i node-v24.22.1-arm64.msi /qn /norestart /l*v "%TEMP%\node-js-lts-install.log"Uninstall
msiexec /x {EDD85574-A4B1-4333-AFFB-0130E8D3D70F} /qn /norestart- MSI product code
- {EDD85574-A4B1-4333-AFFB-0130E8D3D70F}
- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{EDD85574-A4B1-4333-AFFB-0130E8D3D70F}
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-node-js-lts.ps1
$url = 'https://nodejs.org/dist/v24.22.1/node-v24.22.1-x64.msi'
$sha256 = '3BDA4BAF1EE709B33CF920DD633106DDB23951E322BFF9C03EC9F64AB8981B01'
$file = Join-Path $env:TEMP 'node-v24.22.1-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-lts.ps1
$url = 'https://nodejs.org/dist/v24.22.1/node-v24.22.1-arm64.msi'
$sha256 = '5FAF40B7CBA01EBA47DFFF7B5322979F27D0E8F042BAB96CC567A3DF01EC9796'
$file = Join-Path $env:TEMP 'node-v24.22.1-arm64.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