Ordres per instal·lar Node.js sense preguntes, desinstal·lar-lo i detectar-lo des d’eines de desplegament. Només es mostra una ordre quan és segura: la que indica el manifest o el valor per defecte documentat de la tecnologia de l’instal·lador.
Guia relacionada: Instal·lació silenciosa: MSI, NSIS, Inno Setup · Desinstal·lar un programa amb el registre o PowerShell
Amb winget
PowerShell
winget install --id OpenJS.NodeJS -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id OpenJS.NodeJS -e --silentwinget uninstall --id OpenJS.NodeJS -e --silentPer instal·lador
64 bits · MSI · Tots els usuaris
Instal·lació silenciosa
msiexec /i node-v26.12.1-x64.msi /qn /norestartDesar un registre
msiexec /i node-v26.12.1-x64.msi /qn /norestart /l*v "%TEMP%\node-js-install.log"Desinstal·lar
msiexec /x {FBEF4017-499E-43E9-9CB3-09C84C5B3B75} /qn /norestart- Codi de producte MSI
- {FBEF4017-499E-43E9-9CB3-09C84C5B3B75}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FBEF4017-499E-43E9-9CB3-09C84C5B3B75}
ARM64 · MSI · Tots els usuaris
Instal·lació silenciosa
msiexec /i node-v26.12.1-arm64.msi /qn /norestartDesar un registre
msiexec /i node-v26.12.1-arm64.msi /qn /norestart /l*v "%TEMP%\node-js-install.log"Desinstal·lar
msiexec /x {5E2FF966-8E7B-471D-B9C0-30043D39350A} /qn /norestart- Codi de producte MSI
- {5E2FF966-8E7B-471D-B9C0-30043D39350A}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{5E2FF966-8E7B-471D-B9C0-30043D39350A}
PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-node-js.ps1
$url = 'https://nodejs.org/dist/v26.12.1/node-v26.12.1-x64.msi'
$sha256 = 'F32A2844504ED8D73449DDB480385F69CB436BC9409A89E2049AE83447078457'
$file = Join-Path $env:TEMP 'node-v26.12.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.ps1
$url = 'https://nodejs.org/dist/v26.12.1/node-v26.12.1-arm64.msi'
$sha256 = '2BE19B26651210B2541B6872F85D43F31422B9E624D82AAAD8BAA77EAD294D88'
$file = Join-Path $env:TEMP 'node-v26.12.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