Ordres per instal·lar Node.js 22 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.22 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id OpenJS.NodeJS.22 -e --silentwinget uninstall --id OpenJS.NodeJS.22 -e --silentPer instal·lador
64 bits · MSI · Tots els usuaris
Instal·lació silenciosa
msiexec /i node-v22.23.4-x64.msi /qn /norestartDesar un registre
msiexec /i node-v22.23.4-x64.msi /qn /norestart /l*v "%TEMP%\node-js-22-install.log"Desinstal·lar
msiexec /x {DB301453-81CD-4694-8A78-746617513B00} /qn /norestart- Codi de producte MSI
- {DB301453-81CD-4694-8A78-746617513B00}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{DB301453-81CD-4694-8A78-746617513B00}
ARM64 · MSI · Tots els usuaris
Instal·lació silenciosa
msiexec /i node-v22.23.4-arm64.msi /qn /norestartDesar un registre
msiexec /i node-v22.23.4-arm64.msi /qn /norestart /l*v "%TEMP%\node-js-22-install.log"Desinstal·lar
msiexec /x {55FB5612-8E88-42EA-9B29-94F71178FDCD} /qn /norestart- Codi de producte MSI
- {55FB5612-8E88-42EA-9B29-94F71178FDCD}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{55FB5612-8E88-42EA-9B29-94F71178FDCD}
32 bits · MSI · Tots els usuaris
Instal·lació silenciosa
msiexec /i node-v22.23.4-x86.msi /qn /norestartDesar un registre
msiexec /i node-v22.23.4-x86.msi /qn /norestart /l*v "%TEMP%\node-js-22-install.log"Desinstal·lar
msiexec /x {D5308DE4-524D-4BA9-8814-A10A79A07A91} /qn /norestart- Codi de producte MSI
- {D5308DE4-524D-4BA9-8814-A10A79A07A91}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{D5308DE4-524D-4BA9-8814-A10A79A07A91}
PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-node-js-22.ps1
$url = 'https://nodejs.org/dist/v22.23.4/node-v22.23.4-x64.msi'
$sha256 = 'CA9303D3A12E8BEC6DE829FCB7812FC776930E0CE5C030328A24984EF928427E'
$file = Join-Path $env:TEMP 'node-v22.23.4-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-22.ps1
$url = 'https://nodejs.org/dist/v22.23.4/node-v22.23.4-arm64.msi'
$sha256 = '49EDBB15812C13EFA061C2C76B06944425F3711454845E78B625A8E865A45327'
$file = Join-Path $env:TEMP 'node-v22.23.4-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-22.ps1
$url = 'https://nodejs.org/dist/v22.23.4/node-v22.23.4-x86.msi'
$sha256 = 'C2A76D76EDA52B7930B51FD490264C2FE34A094C04AE721BB71893F3FD6CD1D0'
$file = Join-Path $env:TEMP 'node-v22.23.4-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