Commands for installing OpenCodex 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 lidge-jun.OpenCodex -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id lidge-jun.OpenCodex -e --silentwinget uninstall --id lidge-jun.OpenCodex -e --silentBy installer
64-bit · MSI · All users
Silent install
msiexec /i OpenCodex-2.97.0-windows-x64.msi /qn /norestartWrite a log
msiexec /i OpenCodex-2.97.0-windows-x64.msi /qn /norestart /l*v "%TEMP%\lidge-jun-opencodex-install.log"Uninstall
msiexec /x {EB61C9C6-A2A4-4326-BD5C-2E317B4541EC} /qn /norestart- MSI product code
- {EB61C9C6-A2A4-4326-BD5C-2E317B4541EC}
- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{EB61C9C6-A2A4-4326-BD5C-2E317B4541EC}
- UpgradeCode
- {505158BD-FA60-5623-B931-DA1576D39069}
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-lidge-jun-opencodex.ps1
$url = 'https://github.com/lidge-jun/opencodex/releases/download/v2.97.0/OpenCodex-2.97.0-windows-x64.msi'
$sha256 = '8E8A866121E92DADC5FB8FFB147D01E648A4CC29FC15FFB7F483478B9214DAC0'
$file = Join-Path $env:TEMP 'OpenCodex-2.97.0-windows-x64.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