Ordres per instal·lar Screenbox 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 Starpine.Screenbox -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Starpine.Screenbox -e --silentwinget uninstall --id Starpine.Screenbox -e --silentPer instal·lador
Qualsevol processador · MSIX · Usuari actual
Instal·lació silenciosa
Add-AppxPackage -Path Screenbox_0.24.0.0_neutral.msixbundleDesinstal·lar
Get-AppxPackage -Name 18496Starpine.Screenbox | Remove-AppxPackagePowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-screenbox.ps1
$url = 'https://github.com/huynhsontung/Screenbox/releases/download/v0.24.0/Screenbox_0.24.0.0_neutral.msixbundle'
$sha256 = '6D6F03595120D6EE1042E8E7550EE2ADFA3C3C6B51BECBCBF454DB08AEE0D5CF'
$file = Join-Path $env:TEMP 'Screenbox_0.24.0.0_neutral.msixbundle'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file