免互動安裝Netpbm Windows Imaging Component Codec、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id TeamCharLS.NetpbmWicCodec -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id TeamCharLS.NetpbmWicCodec -e --silentwinget uninstall --id TeamCharLS.NetpbmWicCodec -e --silent依安裝檔
64位元 · EXE(WiX Burn) · 所有使用者 · en-US
靜默安裝
NetpbmWicCodecSetup-0.4.0-x64.exe /quiet /norestartARM64 · EXE(WiX Burn) · 所有使用者 · en-US
靜默安裝
NetpbmWicCodecSetup-0.4.0-ARM64.exe /quiet /norestart32位元 · EXE(WiX Burn) · 所有使用者 · en-US
靜默安裝
NetpbmWicCodecSetup-0.4.0-x86.exe /quiet /norestartPowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-netpbm-windows-imaging-component-codec.ps1
$url = 'https://github.com/team-charls/netpbm-wic-codec/releases/download/v0.4.0/NetpbmWicCodecSetup-0.4.0-x64.exe'
$sha256 = 'ABC481466B95309462BAE8A01216E20DB16D2A3E05CA7E4FD089810EC95BA787'
$file = Join-Path $env:TEMP 'NetpbmWicCodecSetup-0.4.0-x64.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 '/quiet /norestart' -Wait install-netpbm-windows-imaging-component-codec.ps1
$url = 'https://github.com/team-charls/netpbm-wic-codec/releases/download/v0.4.0/NetpbmWicCodecSetup-0.4.0-ARM64.exe'
$sha256 = 'BDF5D5792BDD507EA0E923076995CBA2E16A79E45D1F34C9CEED4F598343DD65'
$file = Join-Path $env:TEMP 'NetpbmWicCodecSetup-0.4.0-ARM64.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 '/quiet /norestart' -Wait install-netpbm-windows-imaging-component-codec.ps1
$url = 'https://github.com/team-charls/netpbm-wic-codec/releases/download/v0.4.0/NetpbmWicCodecSetup-0.4.0-x86.exe'
$sha256 = '1D5125C957F69466DEDD2B35EBDD74054ED5380176EC2C2AE9A29531EF0A9D1A'
$file = Join-Path $env:TEMP 'NetpbmWicCodecSetup-0.4.0-x86.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 '/quiet /norestart' -Wait