Les commandes pour installer Node.js 21 sans aucune question, le désinstaller et le détecter depuis un outil de déploiement. Une commande n’apparaît que si elle est certaine : issue du manifeste ou valeur par défaut documentée de la technologie d’installation.
Guide associé: Installation silencieuse : MSI, NSIS, Inno Setup · Désinstaller un programme via le registre ou PowerShell
Avec winget
PowerShell
winget install --id OpenJS.NodeJS.21 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id OpenJS.NodeJS.21 -e --silentwinget uninstall --id OpenJS.NodeJS.21 -e --silentPar installateur
64 bits · MSI · Tous les utilisateurs
Installation silencieuse
msiexec /i node-v21.7.3-x64.msi /qn /norestartÉcrire un journal
msiexec /i node-v21.7.3-x64.msi /qn /norestart /l*v "%TEMP%\node-js-21-install.log"Désinstallation
msiexec /x {22E18847-C43D-44BA-8A7E-715DCB7DBE22} /qn /norestart- Code produit MSI
- {22E18847-C43D-44BA-8A7E-715DCB7DBE22}
- Clé de registre de désinstallation
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{22E18847-C43D-44BA-8A7E-715DCB7DBE22}
ARM64 · MSI · Tous les utilisateurs
Installation silencieuse
msiexec /i node-v21.7.3-arm64.msi /qn /norestartÉcrire un journal
msiexec /i node-v21.7.3-arm64.msi /qn /norestart /l*v "%TEMP%\node-js-21-install.log"Désinstallation
msiexec /x {2832DE74-44DF-424D-A335-5FD26A8D1C4C} /qn /norestart- Code produit MSI
- {2832DE74-44DF-424D-A335-5FD26A8D1C4C}
- Clé de registre de désinstallation
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2832DE74-44DF-424D-A335-5FD26A8D1C4C}
32 bits · MSI · Tous les utilisateurs
Installation silencieuse
msiexec /i node-v21.7.3-x86.msi /qn /norestartÉcrire un journal
msiexec /i node-v21.7.3-x86.msi /qn /norestart /l*v "%TEMP%\node-js-21-install.log"Désinstallation
msiexec /x {535DBF84-AA2A-4F57-A810-531F8EED50D6} /qn /norestart- Code produit MSI
- {535DBF84-AA2A-4F57-A810-531F8EED50D6}
- Clé de registre de désinstallation
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{535DBF84-AA2A-4F57-A810-531F8EED50D6}
PowerShell : télécharger, vérifier, installer
Télécharge le fichier officiel, vérifie son empreinte SHA256 et l’installe en mode silencieux.
install-node-js-21.ps1
$url = 'https://nodejs.org/dist/v21.7.3/node-v21.7.3-x64.msi'
$sha256 = 'DE33D68E92E8948B96515BAFEE206D0B5C1F5440EB2E07AA15D6CE2F6493F53B'
$file = Join-Path $env:TEMP 'node-v21.7.3-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-21.ps1
$url = 'https://nodejs.org/dist/v21.7.3/node-v21.7.3-arm64.msi'
$sha256 = 'E0F70657AD7EE7DAC2B2B6E137B319A9967DA95676567451F92D7A9F39E4CD65'
$file = Join-Path $env:TEMP 'node-v21.7.3-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 install-node-js-21.ps1
$url = 'https://nodejs.org/dist/v21.7.3/node-v21.7.3-x86.msi'
$sha256 = 'B152D667112572C7293408A6968429F20DB117AEF2F01D6CA652C0DCAE9423B0'
$file = Join-Path $env:TEMP 'node-v21.7.3-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