Ordres per instal·lar SnipCommand 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 gurayyarar.SnipCommand -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id gurayyarar.SnipCommand -e --silentwinget uninstall --id gurayyarar.SnipCommand -e --silentPer instal·lador
64 bits · EXE (NSIS)
Instal·lació silenciosa
SnipCommand-0.1.0.exe /SUna altra carpeta
SnipCommand-0.1.0.exe /S /D=C:\Apps\snipcommandPowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-snipcommand.ps1
$url = 'https://github.com/gurayyarar/SnipCommand/releases/download/v0.1.0/SnipCommand-0.1.0.exe'
$sha256 = '3E22617F2CA57E8AAB4A7C0D96BB3CAD1819D5132474234EF6B13DFB4B09961B'
$file = Join-Path $env:TEMP 'SnipCommand-0.1.0.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/S' -Wait