Ordres per instal·lar Motion 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 Nexusbird.Motion -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Nexusbird.Motion -e --silentwinget uninstall --id Nexusbird.Motion -e --silentPer instal·lador
64 bits · MSIX
Instal·lació silenciosa
Add-AppxPackage -Path motion-0.117.0.x64.msixDesinstal·lar
Get-AppxPackage -Name Motion | Remove-AppxPackagePowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-motion.ps1
$url = 'https://github.com/usemotion/desktopapp/releases/download/0.117.0/motion-0.117.0.x64.msix'
$sha256 = '1DE01458D983C8D0D460877F99F0D9CA7869B94361E8698D66336203BABA8F3D'
$file = Join-Path $env:TEMP 'motion-0.117.0.x64.msix'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file