Ordres per instal·lar Node.js 14 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.14 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id OpenJS.NodeJS.14 -e --silentwinget uninstall --id OpenJS.NodeJS.14 -e --silentPer instal·lador
64 bits · MSI · Tots els usuaris
Instal·lació silenciosa
msiexec /i node-v14.21.3-x64.msi /qn /norestartDesar un registre
msiexec /i node-v14.21.3-x64.msi /qn /norestart /l*v "%TEMP%\node-js-14-install.log"Desinstal·lar
msiexec /x {F7F792B4-BCA7-49F6-9E4D-84C76CA30A16} /qn /norestart- Codi de producte MSI
- {F7F792B4-BCA7-49F6-9E4D-84C76CA30A16}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F7F792B4-BCA7-49F6-9E4D-84C76CA30A16}
- Carpeta d’instal·lació
- %ProgramFiles%\nodejs
64 bits · ZIP
No cal instal·lar-lo (portable)
32 bits · MSI · Tots els usuaris
Instal·lació silenciosa
msiexec /i node-v14.21.3-x86.msi /qn /norestartDesar un registre
msiexec /i node-v14.21.3-x86.msi /qn /norestart /l*v "%TEMP%\node-js-14-install.log"Desinstal·lar
msiexec /x {1A1070AE-F677-4619-92DC-283EE7FF5B58} /qn /norestart- Codi de producte MSI
- {1A1070AE-F677-4619-92DC-283EE7FF5B58}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{1A1070AE-F677-4619-92DC-283EE7FF5B58}
- Carpeta d’instal·lació
- %ProgramFiles(x86)%\nodejs
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-14.ps1
$url = 'https://nodejs.org/dist/v14.21.3/node-v14.21.3-x64.msi'
$sha256 = '4FBB9FF48FE733CEF0B65F2C0948BA34B5D4B65EBFA1AA2DCD9C913C7B2BF95E'
$file = Join-Path $env:TEMP 'node-v14.21.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-14.ps1
$url = 'https://nodejs.org/dist/v14.21.3/node-v14.21.3-x86.msi'
$sha256 = 'D07FB9F6C41D2B2568D42A76D3556706A626125981D12421FEF6D4682CB7AE59'
$file = Join-Path $env:TEMP 'node-v14.21.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