Ordres per instal·lar Coffee 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 StevenCole.Coffee -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id StevenCole.Coffee -e --silentwinget uninstall --id StevenCole.Coffee -e --silentPer instal·lador
64 bits · MSI · Tots els usuaris · en-US
Instal·lació silenciosa
msiexec /i download /qn /norestartDesar un registre
msiexec /i download /qn /norestart /l*v "%TEMP%\coffee-install.log"32 bits · MSI · Tots els usuaris · en-US
Instal·lació silenciosa
msiexec /i download /qn /norestartDesar un registre
msiexec /i download /qn /norestart /l*v "%TEMP%\coffee-install.log"PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-coffee.ps1
$url = 'https://sourceforge.net/projects/coffee-sc/files/Coffee%201.0.4%20x64%20(64%20bit).msi/download'
$sha256 = '202442D7795A3C19A63ED142D61D593D729F4D5CE56ADA495930492B1CC1CE41'
$file = Join-Path $env:TEMP 'download'
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-coffee.ps1
$url = 'https://sourceforge.net/projects/coffee-sc/files/Coffee%201.0.4%20x86%20(32%20bit).msi/download'
$sha256 = '767964388BD5FE9BE336A2D47B286138FC2C4851539850852A55774ABA318CF8'
$file = Join-Path $env:TEMP 'download'
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