Kommandon för att installera USBPcap utan frågor, ta bort programmet igen och identifiera det i distributionsverktyg. Ett kommando visas bara när det är säkert: från manifestet eller som installationsteknikens dokumenterade standard.
Relaterad guide: Parametrar för tyst installation: MSI, NSIS, Inno · Avinstallera program via registret eller PowerShell
Med winget
PowerShell
winget install --id desowin.USBPcap -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id desowin.USBPcap -e --silentwinget uninstall --id desowin.USBPcap -e --silentPer installationsfil
64-bitars · EXE (NSIS)
Tyst installation
USBPcapSetup-1.5.4.0.exe /SEgen mapp
USBPcapSetup-1.5.4.0.exe /S /D=C:\Apps\usbpcapPowerShell: ladda ner, kontrollera, installera
Laddar ner den officiella filen, kontrollerar dess SHA256 och installerar tyst.
install-usbpcap.ps1
$url = 'https://github.com/desowin/usbpcap/releases/download/1.5.4.0/USBPcapSetup-1.5.4.0.exe'
$sha256 = '87A7EDF9BBBCF07B5F4373D9A192A6770D2FF3ADD7AA1E276E82E38582CCB622'
$file = Join-Path $env:TEMP 'USBPcapSetup-1.5.4.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