Commands for installing PyAudio without prompts, removing it again and detecting it from deployment tools. A command is shown only when it is certain: from the manifest or the installer technology’s documented default.
Related guide: Silent install switches: MSI, NSIS, Inno Setup · Uninstall a program with the registry or PowerShell
With winget
PowerShell
winget install --id intxcc.pyaudio -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id intxcc.pyaudio -e --silentwinget uninstall --id intxcc.pyaudio -e --silentBy installer
64-bit · MSI
Silent install
msiexec /i PyAudio-0.2.11.win-amd64-py3.7.msi /qn /norestartWrite a log
msiexec /i PyAudio-0.2.11.win-amd64-py3.7.msi /qn /norestart /l*v "%TEMP%\pyaudio-install.log"Uninstall
msiexec /x {C36B32BD-A6C5-4AA3-B541-1320D1529BB2} /qn /norestart- MSI product code
- {C36B32BD-A6C5-4AA3-B541-1320D1529BB2}
- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C36B32BD-A6C5-4AA3-B541-1320D1529BB2}
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-pyaudio.ps1
$url = 'https://github.com/intxcc/pyaudio_portaudio/releases/download/1.1.1/PyAudio-0.2.11.win-amd64-py3.7.msi'
$sha256 = '49A5987DA88BE0007E1067858477A402A31087F6FE50B2BB37E61BBB0F861841'
$file = Join-Path $env:TEMP 'PyAudio-0.2.11.win-amd64-py3.7.msi'
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