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