Commands for installing Node.js 18 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.18 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id OpenJS.NodeJS.18 -e --silentwinget uninstall --id OpenJS.NodeJS.18 -e --silentBy installer
64-bit · MSI · All users
Silent install
msiexec /i node-v18.20.8-x64.msi /qn /norestartWrite a log
msiexec /i node-v18.20.8-x64.msi /qn /norestart /l*v "%TEMP%\node-js-18-install.log"Uninstall
msiexec /x {CC48A89B-2866-40B4-8B58-3DEFB1F2643E} /qn /norestart- MSI product code
- {CC48A89B-2866-40B4-8B58-3DEFB1F2643E}
- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{CC48A89B-2866-40B4-8B58-3DEFB1F2643E}
- Install folder
- %ProgramFiles%\nodejs
64-bit · ZIP
No installation needed (portable)
32-bit · MSI · All users
Silent install
msiexec /i node-v18.20.8-x86.msi /qn /norestartWrite a log
msiexec /i node-v18.20.8-x86.msi /qn /norestart /l*v "%TEMP%\node-js-18-install.log"Uninstall
msiexec /x {4035A1E1-3B32-4961-AD82-1D0E05AE5FD7} /qn /norestart- MSI product code
- {4035A1E1-3B32-4961-AD82-1D0E05AE5FD7}
- Uninstall registry key
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{4035A1E1-3B32-4961-AD82-1D0E05AE5FD7}
- 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-18.ps1
$url = 'https://nodejs.org/dist/v18.20.8/node-v18.20.8-x64.msi'
$sha256 = 'BD8B92343E12DBE9E573D2F5D5FEC6953FCF12E00ADD58A29A6774391D02F342'
$file = Join-Path $env:TEMP 'node-v18.20.8-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-18.ps1
$url = 'https://nodejs.org/dist/v18.20.8/node-v18.20.8-x86.msi'
$sha256 = 'C7A04A1378CB66F5716F2B67C65921497972E883541BC48C0B19C92668F1713D'
$file = Join-Path $env:TEMP 'node-v18.20.8-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