Ordres per instal·lar Node.js 15 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.15 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id OpenJS.NodeJS.15 -e --silentwinget uninstall --id OpenJS.NodeJS.15 -e --silentPer instal·lador
64 bits · MSI · Tots els usuaris
Instal·lació silenciosa
msiexec /i node-v15.14.0-x64.msi /qn /norestartDesar un registre
msiexec /i node-v15.14.0-x64.msi /qn /norestart /l*v "%TEMP%\node-js-15-install.log"Desinstal·lar
msiexec /x {C6D70F34-C254-4D55-B4A0-55F921939297} /qn /norestart- Codi de producte MSI
- {C6D70F34-C254-4D55-B4A0-55F921939297}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C6D70F34-C254-4D55-B4A0-55F921939297}
64 bits · ZIP
No cal instal·lar-lo (portable)
32 bits · MSI · Tots els usuaris
Instal·lació silenciosa
msiexec /i node-v15.14.0-x86.msi /qn /norestartDesar un registre
msiexec /i node-v15.14.0-x86.msi /qn /norestart /l*v "%TEMP%\node-js-15-install.log"Desinstal·lar
msiexec /x {28252A3F-2643-4144-AFF4-106A5C6877FA} /qn /norestart- Codi de producte MSI
- {28252A3F-2643-4144-AFF4-106A5C6877FA}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{28252A3F-2643-4144-AFF4-106A5C6877FA}
32 bits · ZIP
No cal instal·lar-lo (portable)
PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-node-js-15.ps1
$url = 'https://nodejs.org/dist/v15.14.0/node-v15.14.0-x64.msi'
$sha256 = 'FA460C0483126BAD8296BE312F23BDC8C8BAF0974F512427B1C90846971AF29F'
$file = Join-Path $env:TEMP 'node-v15.14.0-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-15.ps1
$url = 'https://nodejs.org/dist/v15.14.0/node-v15.14.0-x86.msi'
$sha256 = 'D22B24E8FE60B6D730F9241C36B0F6B1A34B735EECE478DD24C0792E2576C1C8'
$file = Join-Path $env:TEMP 'node-v15.14.0-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