Commands for installing K-Lite Mega Codec Pack 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 CodecGuide.K-LiteCodecPack.Mega -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id CodecGuide.K-LiteCodecPack.Mega -e --silentwinget uninstall --id CodecGuide.K-LiteCodecPack.Mega -e --silentBy installer
64-bit · EXE (Inno Setup) · All users
Silent install
K-Lite_Codec_Pack_2020_Mega.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Custom folder
K-Lite_Codec_Pack_2020_Mega.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\k-lite-mega-codec-pack"32-bit · EXE (Inno Setup) · All users
Silent install
K-Lite_Codec_Pack_2020_Mega.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Custom folder
K-Lite_Codec_Pack_2020_Mega.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\k-lite-mega-codec-pack"PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-k-lite-mega-codec-pack.ps1
$url = 'https://files2.codecguide.com/K-Lite_Codec_Pack_2020_Mega.exe'
$sha256 = '6C6878F9FD8CCF3A74A4A3A500AB8303C7B0DD2BEAB9D8DB39A016141E495B3D'
$file = Join-Path $env:TEMP 'K-Lite_Codec_Pack_2020_Mega.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-k-lite-mega-codec-pack.ps1
$url = 'https://files2.codecguide.com/K-Lite_Codec_Pack_2020_Mega.exe'
$sha256 = '6C6878F9FD8CCF3A74A4A3A500AB8303C7B0DD2BEAB9D8DB39A016141E495B3D'
$file = Join-Path $env:TEMP 'K-Lite_Codec_Pack_2020_Mega.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait