Ordres per instal·lar Node.js 8 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.8 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id OpenJS.NodeJS.8 -e --silentwinget uninstall --id OpenJS.NodeJS.8 -e --silentPer instal·lador
64 bits · MSI · Tots els usuaris
Instal·lació silenciosa
msiexec /i node-v8.11.3-x64.msi /qn /norestartDesar un registre
msiexec /i node-v8.11.3-x64.msi /qn /norestart /l*v "%TEMP%\node-js-8-install.log"Desinstal·lar
msiexec /x {D453BC74-B405-4241-9095-808419A77FB3} /qn /norestart- Codi de producte MSI
- {D453BC74-B405-4241-9095-808419A77FB3}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{D453BC74-B405-4241-9095-808419A77FB3}
- 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-v8.11.3-x86.msi /qn /norestartDesar un registre
msiexec /i node-v8.11.3-x86.msi /qn /norestart /l*v "%TEMP%\node-js-8-install.log"Desinstal·lar
msiexec /x {B4A49706-61E4-4BAF-BFA8-F97321FF3708} /qn /norestart- Codi de producte MSI
- {B4A49706-61E4-4BAF-BFA8-F97321FF3708}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{B4A49706-61E4-4BAF-BFA8-F97321FF3708}
- 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-8.ps1
$url = 'https://nodejs.org/dist/v8.11.3/node-v8.11.3-x64.msi'
$sha256 = 'D7E3057E921803159266FF1340283420A3E5053BAD0C3FF951D8946A8F9AA66B'
$file = Join-Path $env:TEMP 'node-v8.11.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-8.ps1
$url = 'https://nodejs.org/dist/v8.11.3/node-v8.11.3-x86.msi'
$sha256 = '66D1750F03F9319312843E8E80764625C8157600C1ADD99CBA92C783CF9FF02A'
$file = Join-Path $env:TEMP 'node-v8.11.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